PK }'V\\index.js(function (global, factory) { if (typeof define === "function" && define.amd) { define(["exports"], factory); } else if (typeof exports !== "undefined") { factory(exports); } else { var mod = { exports: {} }; factory(mod.exports); global.unknown = mod.exports; } })(this, function (_exports) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.default = void 0; !function (global) { "use strict"; var Op = Object.prototype; var hasOwn = Op.hasOwnProperty; var undefined; var $Symbol = typeof Symbol === "function" ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || "@@iterator"; var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; var inModule = typeof module === "object"; var runtime = global.regeneratorRuntime; if (runtime) { if (inModule) { module.exports = runtime; } return; } runtime = global.regeneratorRuntime = inModule ? module.exports || {} : {}; function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; var generator = Object.create(protoGenerator.prototype); var context = new Context(tryLocsList || []); generator._invoke = makeInvokeMethod(innerFn, self, context); return generator; } runtime.wrap = wrap; function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } var GenStateSuspendedStart = "suspendedStart"; var GenStateSuspendedYield = "suspendedYield"; var GenStateExecuting = "executing"; var GenStateCompleted = "completed"; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; IteratorPrototype[iteratorSymbol] = function () { return this; }; var getProto = Object.getPrototypeOf; var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { IteratorPrototype = NativeIteratorPrototype; } var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; GeneratorFunctionPrototype.constructor = GeneratorFunction; GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { prototype[method] = function (arg) { return this._invoke(method, arg); }; }); } runtime.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; runtime.mark = function (genFun) { if (Object.setPrototypeOf) { Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); } else { genFun.__proto__ = GeneratorFunctionPrototype; if (!(toStringTagSymbol in genFun)) { genFun[toStringTagSymbol] = "GeneratorFunction"; } } genFun.prototype = Object.create(Gp); return genFun; }; runtime.awrap = function (arg) { return { __await: arg }; }; function AsyncIterator(generator) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (record.type === "throw") { reject(record.arg); } else { var result = record.arg; var value = result.value; if (value && typeof value === "object" && hasOwn.call(value, "__await")) { return Promise.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }); } return Promise.resolve(value).then(function (unwrapped) { result.value = unwrapped; resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } } var previousPromise; function enqueue(method, arg) { function callInvokeWithMethodAndArg() { return new Promise(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } this._invoke = enqueue; } defineIteratorMethods(AsyncIterator.prototype); AsyncIterator.prototype[asyncIteratorSymbol] = function () { return this; }; runtime.AsyncIterator = AsyncIterator; runtime.async = function (innerFn, outerFn, self, tryLocsList) { var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }; function makeInvokeMethod(innerFn, self, context) { var state = GenStateSuspendedStart; return function invoke(method, arg) { if (state === GenStateExecuting) { throw new Error("Generator is already running"); } if (state === GenStateCompleted) { if (method === "throw") { throw arg; } return doneResult(); } context.method = method; context.arg = arg; while (true) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if (context.method === "next") { context.sent = context._sent = context.arg; } else if (context.method === "throw") { if (state === GenStateSuspendedStart) { state = GenStateCompleted; throw context.arg; } context.dispatchException(context.arg); } else if (context.method === "return") { context.abrupt("return", context.arg); } state = GenStateExecuting; var record = tryCatch(innerFn, self, context); if (record.type === "normal") { state = context.done ? GenStateCompleted : GenStateSuspendedYield; if (record.arg === ContinueSentinel) { continue; } return { value: record.arg, done: context.done }; } else if (record.type === "throw") { state = GenStateCompleted; context.method = "throw"; context.arg = record.arg; } } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (method === undefined) { context.delegate = null; if (context.method === "throw") { if (delegate.iterator.return) { context.method = "return"; context.arg = undefined; maybeInvokeDelegate(delegate, context); if (context.method === "throw") { return ContinueSentinel; } } context.method = "throw"; context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if (record.type === "throw") { context.method = "throw"; context.arg = record.arg; context.delegate = null; return ContinueSentinel; } var info = record.arg; if (!info) { context.method = "throw"; context.arg = new TypeError("iterator result is not an object"); context.delegate = null; return ContinueSentinel; } if (info.done) { context[delegate.resultName] = info.value; context.next = delegate.nextLoc; if (context.method !== "return") { context.method = "next"; context.arg = undefined; } } else { return info; } context.delegate = null; return ContinueSentinel; } defineIteratorMethods(Gp); Gp[toStringTagSymbol] = "Generator"; Gp[iteratorSymbol] = function () { return this; }; Gp.toString = function () { return "[object Generator]"; }; function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; if (1 in locs) { entry.catchLoc = locs[1]; } if (2 in locs) { entry.finallyLoc = locs[2]; entry.afterLoc = locs[3]; } this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal"; delete record.arg; entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }]; tryLocsList.forEach(pushTryEntry, this); this.reset(true); } runtime.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } keys.reverse(); return function next() { while (keys.length) { var key = keys.pop(); if (key in object) { next.value = key; next.done = false; return next; } } next.done = true; return next; }; }; function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) { return iteratorMethod.call(iterable); } if (typeof iterable.next === "function") { return iterable; } if (!isNaN(iterable.length)) { var i = -1, next = function next() { while (++i < iterable.length) { if (hasOwn.call(iterable, i)) { next.value = iterable[i]; next.done = false; return next; } } next.value = undefined; next.done = true; return next; }; return next.next = next; } } return { next: doneResult }; } runtime.values = values; function doneResult() { return { value: undefined, done: true }; } Context.prototype = { constructor: Context, reset: function (skipTempReset) { this.prev = 0; this.next = 0; this.sent = this._sent = undefined; this.done = false; this.delegate = null; this.method = "next"; this.arg = undefined; this.tryEntries.forEach(resetTryEntry); if (!skipTempReset) { for (var name in this) { if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { this[name] = undefined; } } } }, stop: function () { this.done = true; var rootEntry = this.tryEntries[0]; var rootRecord = rootEntry.completion; if (rootRecord.type === "throw") { throw rootRecord.arg; } return this.rval; }, dispatchException: function (exception) { if (this.done) { throw exception; } var context = this; function handle(loc, caught) { record.type = "throw"; record.arg = exception; context.next = loc; if (caught) { context.method = "next"; context.arg = undefined; } return !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === "root") { return handle("end"); } if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"); var hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } else if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else if (hasCatch) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } } else if (hasFinally) { if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else { throw new Error("try statement without catch or finally"); } } } }, abrupt: function (type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { finallyEntry = null; } var record = finallyEntry ? finallyEntry.completion : {}; record.type = type; record.arg = arg; if (finallyEntry) { this.method = "next"; this.next = finallyEntry.finallyLoc; return ContinueSentinel; } return this.complete(record); }, complete: function (record, afterLoc) { if (record.type === "throw") { throw record.arg; } if (record.type === "break" || record.type === "continue") { this.next = record.arg; } else if (record.type === "return") { this.rval = this.arg = record.arg; this.method = "return"; this.next = "end"; } else if (record.type === "normal" && afterLoc) { this.next = afterLoc; } return ContinueSentinel; }, finish: function (finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) { this.complete(entry.completion, entry.afterLoc); resetTryEntry(entry); return ContinueSentinel; } } }, "catch": function (tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === "throw") { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function (iterable, resultName, nextLoc) { this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }; if (this.method === "next") { this.arg = undefined; } return ContinueSentinel; } }; }(function () { return this || typeof self === "object" && self; }() || Function("return this")()); const disableBlocks = { debug: [], upload: [] }; const mustLoginBlocks = []; const triggerBlocksStatus = async (mode, app) => {}; class ExtImpl {} const extTranslationMap = { "zh": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "de": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "es": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "fr": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "id": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "ja": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "ja-jph": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "ko": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "pl": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "uk": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "zh-hant": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "nl": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "it": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "hr": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "ru": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "pt": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "fi": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "tr": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "tk": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }, "en": { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" } }; const codeSnippets = { arduinoc: {} }; const extGenerators = [{ lang: 'arduinoc', template: `// generated by mBlock5 for // codes make you happy //( include //) #include //( lib //) //({ this.$ALL_VARIABLES.length==0?'':this.$ALL_VARIABLES.map(v=>"float "+v+" = 0;").join('\\n') }//) //( declare //) void _delay(float seconds) { long endTime = millis() + seconds * 1000; while(millis() < endTime) _loop(); } //( void setup() { //( setup //) //( code //) } //) void _loop() { //( _loop //) } void loop() { _loop(); }`, splitor: { frame: { left: "//(", right: "//)" }, expression: { left: "/*{", right: "}*/" } }, reducers: [{ name: 'include', reduce: codes => { let codes1 = []; for (let code of codes) { let codeStr = ''; if (typeof code === 'string') { codeStr = code; } else if (typeof code === 'function') { codeStr = code(); } if (codes1.indexOf(codeStr) === -1) { codes1.push(codeStr); } } if (codes1.length === 0) { return undefined; } return codes1.map(code => { return '#include ' + code; }).join('\n') + '\n'; } }] }]; const extSources = { arduino: [{ filename: "src/DS3231.cpp", code: "/*\nDS3231.cpp: DS3231 Real-Time Clock library\nEric Ayars\n4/1/11\n\nSpliced in DateTime all-at-once reading (to avoid rollover) and unix time\nfrom Jean-Claude Wippler and Limor Fried\nAndy Wickert\n5/15/11\n\nFixed problem with SD processors(no function call) by replacing all occurences of the term PM, which\nis defined as a macro on SAMD controllers by PM_time. \nSimon Gassner\n11/28/2017\n\nFixed setting 12-hour clock in setHour function so that 12:xx AM is not stored as 00:xx and corrected \nthe setting of the PM flag for 12:xx PM. These address certain DS3231 errors in properly setting the \nAM/PM (bit 5) flag in the 02h register when passing from AM to PM and PM to AM.\nDavid Merrifield\n04/14/2020\n\nReleased into the public domain.\n*/\n\n#include \"DS3231.h\"\n\n// These included for the DateTime class inclusion; will try to find a way to\n// not need them in the future...\n#if defined(__AVR__)\n#include \n#elif defined(ESP8266)\n#include \n#endif\n// Changed the following to work on 1.0\n//#include \"WProgram.h\"\n#include \n\n\n#define CLOCK_ADDRESS 0x68\n\n#define SECONDS_FROM_1970_TO_2000 946684800\n\n\n// Constructor\nDS3231::DS3231() : _Wire(Wire) {\n\t// nothing to do for this constructor.\n}\n\nDS3231::DS3231(TwoWire & w) : _Wire(w) {\n}\n\n// Utilities from JeeLabs/Ladyada\n\n////////////////////////////////////////////////////////////////////////////////\n// utility code, some of this could be exposed in the DateTime API if needed\n\n// DS3231 is smart enough to know this, but keeping it for now so I don't have\n// to rewrite their code. -ADW\nstatic const uint8_t daysInMonth [] PROGMEM = { 31,28,31,30,31,30,31,31,30,31,30,31 };\n\n// number of days since 2000/01/01, valid for 2001..2099\nstatic uint16_t date2days(uint16_t y, uint8_t m, uint8_t d) {\n if (y >= 2000)\n y -= 2000;\n uint16_t days = d;\n for (uint8_t i = 1; i < m; ++i)\n days += pgm_read_byte(daysInMonth + i - 1);\n if (m > 2 && isleapYear(y))\n ++days;\n return days + 365 * y + (y + 3) / 4 - 1;\n}\n\nstatic long time2long(uint16_t days, uint8_t h, uint8_t m, uint8_t s) {\n return ((days * 24L + h) * 60 + m) * 60 + s;\n}\n\n/***************************************** \n\tPublic Functions\n *****************************************/\n\n/*******************************************************************************\n * TO GET ALL DATE/TIME INFORMATION AT ONCE AND AVOID THE CHANCE OF ROLLOVER\n * DateTime implementation spliced in here from Jean-Claude Wippler's (JeeLabs)\n * RTClib, as modified by Limor Fried (Ladyada); source code at:\n * https://github.com/adafruit/RTClib\n ******************************************************************************/\n\n////////////////////////////////////////////////////////////////////////////////\n// DateTime implementation - ignores time zones and DST changes\n// NOTE: also ignores leap seconds, see http://en.wikipedia.org/wiki/Leap_second\n\nDateTime::DateTime (uint32_t t) {\n t -= SECONDS_FROM_1970_TO_2000; // bring to 2000 timestamp from 1970\n\n ss = t % 60;\n t /= 60;\n mm = t % 60;\n t /= 60;\n hh = t % 24;\n uint16_t days = t / 24;\n uint8_t leap;\n for (yOff = 0; ; ++yOff) {\n leap = isleapYear(yOff);\n if (days < 365 + leap)\n break;\n days -= 365 + leap;\n }\n for (m = 1; ; ++m) {\n uint8_t daysPerMonth = pgm_read_byte(daysInMonth + m - 1);\n if (leap && m == 2)\n ++daysPerMonth;\n if (days < daysPerMonth)\n break;\n days -= daysPerMonth;\n }\n d = days + 1;\n}\n\nDateTime::DateTime (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec) {\n if (year >= 2000)\n year -= 2000;\n yOff = year;\n m = month;\n d = day;\n hh = hour;\n mm = min;\n ss = sec;\n}\n\n// supported formats are date \"Mmm dd yyyy\" and time \"hh:mm:ss\" (same as __DATE__ and __TIME__)\nDateTime::DateTime(const char* date, const char* time) {\n static const char month_names[] = \"JanFebMarAprMayJunJulAugSepOctNovDec\";\n static char buff[4] = {'0','0','0','0'};\n int y;\n sscanf(date, \"%s %c %d\", buff, &d, &y);\n yOff = y >= 2000 ? y - 2000 : y;\n m = (strstr(month_names, buff) - month_names) / 3 + 1;\n sscanf(time, \"%c:%c:%c\", &hh, &mm, &ss);\n}\n\n// UNIX time: IS CORRECT ONLY WHEN SET TO UTC!!!\nuint32_t DateTime::unixtime(void) const {\n uint32_t t;\n uint16_t days = date2days(yOff, m, d);\n t = time2long(days, hh, mm, ss);\n t += SECONDS_FROM_1970_TO_2000; // seconds from 1970 to 2000\n\n return t;\n}\n\n// Slightly modified from JeeLabs / Ladyada\n// Get all date/time at once to avoid rollover (e.g., minute/second don't match)\nstatic uint8_t bcd2bin (uint8_t val) { return val - 6 * (val >> 4); }\n// Commented to avoid compiler warnings, but keeping in case we want this\n// eventually\n//static uint8_t bin2bcd (uint8_t val) { return val + 6 * (val / 10); }\n\nbool isleapYear(const uint8_t y) {\n if(y&3)//check if divisible by 4\n return false;\n //only check other, when first failed\n return (y % 100 || y % 400 == 0);\n}\n\nDateTime RTClib::now(TwoWire & _Wire) {\n _Wire.beginTransmission(CLOCK_ADDRESS);\n _Wire.write(0);\t// This is the first register address (Seconds)\n \t\t\t// We'll read from here on for 7 bytes: secs reg, minutes reg, hours, days, months and years.\n _Wire.endTransmission();\n \n _Wire.requestFrom(CLOCK_ADDRESS, 7);\n uint16_t ss = bcd2bin(_Wire.read() & 0x7F);\n uint16_t mm = bcd2bin(_Wire.read());\n uint16_t hh = bcd2bin(_Wire.read());\n _Wire.read();\n uint16_t d = bcd2bin(_Wire.read());\n uint16_t m = bcd2bin(_Wire.read());\n uint16_t y = bcd2bin(_Wire.read()) + 2000;\n \n return DateTime (y, m, d, hh, mm, ss);\n}\n\n///// ERIC'S ORIGINAL CODE FOLLOWS /////\n\nbyte DS3231::getSecond() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x00);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\nbyte DS3231::getMinute() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x01);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\nbyte DS3231::getHour(bool& h12, bool& PM_time) {\n\tbyte temp_buffer;\n\tbyte hour;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\ttemp_buffer = _Wire.read();\n\th12 = temp_buffer & 0b01000000;\n\tif (h12) {\n\t\tPM_time = temp_buffer & 0b00100000;\n\t\thour = bcdToDec(temp_buffer & 0b00011111);\n\t} else {\n\t\thour = bcdToDec(temp_buffer & 0b00111111);\n\t}\n\treturn hour;\n}\n\nbyte DS3231::getDoW() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x03);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\nbyte DS3231::getDate() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x04);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\nbyte DS3231::getMonth(bool& Century) {\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x05);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\ttemp_buffer = _Wire.read();\n\tCentury = temp_buffer & 0b10000000;\n\treturn (bcdToDec(temp_buffer & 0b01111111)) ;\n}\n\nbyte DS3231::getYear() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x06);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\n// setEpoch function gives the epoch as parameter and feeds the RTC\n// epoch = UnixTime and starts at 01.01.1970 00:00:00\nvoid DS3231::setEpoch(time_t epoch, bool flag_localtime) {\n\tstruct tm tmnow;\n\tif (flag_localtime) {\n\t\tlocaltime_r(&epoch, &tmnow);\n\t}\n\telse {\n\t\tgmtime_r(&epoch, &tmnow);\n\t}\n\tsetSecond(tmnow.tm_sec);\n\tsetMinute(tmnow.tm_min);\n\tsetHour(tmnow.tm_hour);\n\tsetDoW(tmnow.tm_wday + 1);\n\tsetDate(tmnow.tm_mday);\n\tsetMonth(tmnow.tm_mon + 1);\n\tsetYear(tmnow.tm_year - 100);\n}\n\nvoid DS3231::setSecond(byte Second) {\n\t// Sets the seconds \n\t// This function also resets the Oscillator Stop Flag, which is set\n\t// whenever power is interrupted.\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x00);\n\t_Wire.write(decToBcd(Second));\t\n\t_Wire.endTransmission();\n\t// Clear OSF flag\n\tbyte temp_buffer = readControlByte(1);\n\twriteControlByte((temp_buffer & 0b01111111), 1);\n}\n\nvoid DS3231::setMinute(byte Minute) {\n\t// Sets the minutes \n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x01);\n\t_Wire.write(decToBcd(Minute));\t\n\t_Wire.endTransmission();\n}\n\n// Following setHour revision by David Merrifield 4/14/2020 correcting handling of 12-hour clock\n\nvoid DS3231::setHour(byte Hour) {\n\t// Sets the hour, without changing 12/24h mode.\n\t// The hour must be in 24h format.\n\n\tbool h12;\n\tbyte temp_hour;\n\n\t// Start by figuring out what the 12/24 mode is\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.endTransmission();\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\th12 = (_Wire.read() & 0b01000000);\n\t// if h12 is true, it's 12h mode; false is 24h.\n\n\tif (h12) {\n\t\t// 12 hour\n\t\tbool am_pm = (Hour > 11);\n\t\ttemp_hour = Hour;\n\t\tif (temp_hour > 11) {\n\t\t\ttemp_hour = temp_hour - 12;\n\t\t}\n\t\tif (temp_hour == 0) {\n\t\t\ttemp_hour = 12;\n\t\t}\n\t\ttemp_hour = decToBcd(temp_hour) | (am_pm << 5) | 0b01000000;\n\t} else {\n\t\t// 24 hour\n\t\ttemp_hour = decToBcd(Hour) & 0b10111111;\n\t}\n\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.write(temp_hour);\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setDoW(byte DoW) {\n\t// Sets the Day of Week\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x03);\n\t_Wire.write(decToBcd(DoW));\t\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setDate(byte Date) {\n\t// Sets the Date\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x04);\n\t_Wire.write(decToBcd(Date));\t\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setMonth(byte Month) {\n\t// Sets the month\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x05);\n\t_Wire.write(decToBcd(Month));\t\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setYear(byte Year) {\n\t// Sets the year\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x06);\n\t_Wire.write(decToBcd(Year));\t\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setClockMode(bool h12) {\n\t// sets the mode to 12-hour (true) or 24-hour (false).\n\t// One thing that bothers me about how I've written this is that\n\t// if the read and right happen at the right hourly millisecnd,\n\t// the clock will be set back an hour. Not sure how to do it better, \n\t// though, and as long as one doesn't set the mode frequently it's\n\t// a very minimal risk. \n\t// It's zero risk if you call this BEFORE setting the hour, since\n\t// the setHour() function doesn't change this mode.\n\t\n\tbyte temp_buffer;\n\n\t// Start by reading byte 0x02.\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.endTransmission();\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\ttemp_buffer = _Wire.read();\n\n\t// Set the flag to the requested value:\n\tif (h12) {\n\t\ttemp_buffer = temp_buffer | 0b01000000;\n\t} else {\n\t\ttemp_buffer = temp_buffer & 0b10111111;\n\t}\n\n\t// Write the byte\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.write(temp_buffer);\n\t_Wire.endTransmission();\n}\n\nfloat DS3231::getTemperature() {\n\t// Checks the internal thermometer on the DS3231 and returns the \n\t// temperature as a floating-point value.\n\n // Updated / modified a tiny bit from \"Coding Badly\" and \"Tri-Again\"\n // http://forum.arduino.cc/index.php/topic,22301.0.html\n \n byte tMSB, tLSB;\n float temp3231;\n \n // temp registers (11h-12h) get updated automatically every 64s\n _Wire.beginTransmission(CLOCK_ADDRESS);\n _Wire.write(0x11);\n _Wire.endTransmission();\n _Wire.requestFrom(CLOCK_ADDRESS, 2);\n\n // Should I do more \"if available\" checks here?\n if(_Wire.available()) {\n tMSB = _Wire.read(); //2's complement int portion\n tLSB = _Wire.read(); //fraction portion\n\n int16_t itemp = ( tMSB << 8 | (tLSB & 0xC0) ); // Shift upper byte, add lower\n temp3231 = ( (float)itemp / 256.0 ); // Scale and return\n }\n else {\n temp3231 = -9999; // Impossible temperature; error value\n }\n \n return temp3231;\n}\n\nvoid DS3231::getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM) {\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x07);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 4);\n\n\ttemp_buffer\t= _Wire.read();\t// Get A1M1 and A1 Seconds\n\tA1Second\t= bcdToDec(temp_buffer & 0b01111111);\n\t// put A1M1 bit in position 0 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>7;\n\n\ttemp_buffer\t\t= _Wire.read();\t// Get A1M2 and A1 minutes\n\tA1Minute\t= bcdToDec(temp_buffer & 0b01111111);\n\t// put A1M2 bit in position 1 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>6;\n\n\ttemp_buffer\t= _Wire.read();\t// Get A1M3 and A1 Hour\n\t// put A1M3 bit in position 2 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>5;\n\t// determine A1 12/24 mode\n\tA1h12\t\t= temp_buffer & 0b01000000;\n\tif (A1h12) {\n\t\tA1PM\t= temp_buffer & 0b00100000;\t\t\t// determine am/pm\n\t\tA1Hour\t= bcdToDec(temp_buffer & 0b00011111);\t// 12-hour\n\t} else {\n\t\tA1Hour\t= bcdToDec(temp_buffer & 0b00111111);\t// 24-hour\n\t}\n\n\ttemp_buffer\t= _Wire.read();\t// Get A1M4 and A1 Day/Date\n\t// put A1M3 bit in position 3 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>4;\n\t// determine A1 day or date flag\n\tA1Dy\t\t= (temp_buffer & 0b01000000)>>6;\n\tif (A1Dy) {\n\t\t// alarm is by day of week, not date.\n\t\tA1Day\t= bcdToDec(temp_buffer & 0b00001111);\n\t} else {\n\t\t// alarm is by date, not day of week.\n\t\tA1Day\t= bcdToDec(temp_buffer & 0b00111111);\n\t}\n}\n\nvoid DS3231::getA2Time(byte& A2Day, byte& A2Hour, byte& A2Minute, byte& AlarmBits, bool& A2Dy, bool& A2h12, bool& A2PM) {\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x0b);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 3); \n\ttemp_buffer\t= _Wire.read();\t// Get A2M2 and A2 Minutes\n\tA2Minute\t= bcdToDec(temp_buffer & 0b01111111);\n\t// put A2M2 bit in position 4 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>3;\n\n\ttemp_buffer\t= _Wire.read();\t// Get A2M3 and A2 Hour\n\t// put A2M3 bit in position 5 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>2;\n\t// determine A2 12/24 mode\n\tA2h12\t\t= temp_buffer & 0b01000000;\n\tif (A2h12) {\n\t\tA2PM\t= temp_buffer & 0b00100000;\t\t\t// determine am/pm\n\t\tA2Hour\t= bcdToDec(temp_buffer & 0b00011111);\t// 12-hour\n\t} else {\n\t\tA2Hour\t= bcdToDec(temp_buffer & 0b00111111);\t// 24-hour\n\t}\n\n\ttemp_buffer\t= _Wire.read();\t// Get A2M4 and A1 Day/Date\n\t// put A2M4 bit in position 6 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>1;\n\t// determine A2 day or date flag\n\tA2Dy\t\t= (temp_buffer & 0b01000000)>>6;\n\tif (A2Dy) {\n\t\t// alarm is by day of week, not date.\n\t\tA2Day\t= bcdToDec(temp_buffer & 0b00001111);\n\t} else {\n\t\t// alarm is by date, not day of week.\n\t\tA2Day\t= bcdToDec(temp_buffer & 0b00111111);\n\t}\n}\n\nvoid DS3231::setA1Time(byte A1Day, byte A1Hour, byte A1Minute, byte A1Second, byte AlarmBits, bool A1Dy, bool A1h12, bool A1PM) {\n\t//\tSets the alarm-1 date and time on the DS3231, using A1* information\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x07);\t// A1 starts at 07h\n\t// Send A1 second and A1M1\n\t_Wire.write(decToBcd(A1Second) | ((AlarmBits & 0b00000001) << 7));\n\t// Send A1 Minute and A1M2\n\t_Wire.write(decToBcd(A1Minute) | ((AlarmBits & 0b00000010) << 6));\n\t// Figure out A1 hour \n\tif (A1h12) {\n\t\t// Start by converting existing time to h12 if it was given in 24h.\n\t\tif (A1Hour > 12) {\n\t\t\t// well, then, this obviously isn't a h12 time, is it?\n\t\t\tA1Hour = A1Hour - 12;\n\t\t\tA1PM = true;\n\t\t}\n\t\tif (A1PM) {\n\t\t\t// Afternoon\n\t\t\t// Convert the hour to BCD and add appropriate flags.\n\t\t\ttemp_buffer = decToBcd(A1Hour) | 0b01100000;\n\t\t} else {\n\t\t\t// Morning\n\t\t\t// Convert the hour to BCD and add appropriate flags.\n\t\t\ttemp_buffer = decToBcd(A1Hour) | 0b01000000;\n\t\t}\n\t} else {\n\t\t// Now for 24h\n\t\ttemp_buffer = decToBcd(A1Hour); \n\t}\n\ttemp_buffer = temp_buffer | ((AlarmBits & 0b00000100)<<5);\n\t// A1 hour is figured out, send it\n\t_Wire.write(temp_buffer); \n\t// Figure out A1 day/date and A1M4\n\ttemp_buffer = ((AlarmBits & 0b00001000)<<4) | decToBcd(A1Day);\n\tif (A1Dy) {\n\t\t// Set A1 Day/Date flag (Otherwise it's zero)\n\t\ttemp_buffer = temp_buffer | 0b01000000;\n\t}\n\t_Wire.write(temp_buffer);\n\t// All done!\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setA2Time(byte A2Day, byte A2Hour, byte A2Minute, byte AlarmBits, bool A2Dy, bool A2h12, bool A2PM) {\n\t//\tSets the alarm-2 date and time on the DS3231, using A2* information\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x0b);\t// A1 starts at 0bh\n\t// Send A2 Minute and A2M2\n\t_Wire.write(decToBcd(A2Minute) | ((AlarmBits & 0b00010000) << 3));\n\t// Figure out A2 hour \n\tif (A2h12) {\n\t\t// Start by converting existing time to h12 if it was given in 24h.\n\t\tif (A2Hour > 12) {\n\t\t\t// well, then, this obviously isn't a h12 time, is it?\n\t\t\tA2Hour = A2Hour - 12;\n\t\t\tA2PM = true;\n\t\t}\n\t\tif (A2PM) {\n\t\t\t// Afternoon\n\t\t\t// Convert the hour to BCD and add appropriate flags.\n\t\t\ttemp_buffer = decToBcd(A2Hour) | 0b01100000;\n\t\t} else {\n\t\t\t// Morning\n\t\t\t// Convert the hour to BCD and add appropriate flags.\n\t\t\ttemp_buffer = decToBcd(A2Hour) | 0b01000000;\n\t\t}\n\t} else {\n\t\t// Now for 24h\n\t\ttemp_buffer = decToBcd(A2Hour); \n\t}\n\t// add in A2M3 bit\n\ttemp_buffer = temp_buffer | ((AlarmBits & 0b00100000)<<2);\n\t// A2 hour is figured out, send it\n\t_Wire.write(temp_buffer); \n\t// Figure out A2 day/date and A2M4\n\ttemp_buffer = ((AlarmBits & 0b01000000)<<1) | decToBcd(A2Day);\n\tif (A2Dy) {\n\t\t// Set A2 Day/Date flag (Otherwise it's zero)\n\t\ttemp_buffer = temp_buffer | 0b01000000;\n\t}\n\t_Wire.write(temp_buffer);\n\t// All done!\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::turnOnAlarm(byte Alarm) {\n\t// turns on alarm number \"Alarm\". Defaults to 2 if Alarm is not 1.\n\tbyte temp_buffer = readControlByte(0);\n\t// modify control byte\n\tif (Alarm == 1) {\n\t\ttemp_buffer = temp_buffer | 0b00000101;\n\t} else {\n\t\ttemp_buffer = temp_buffer | 0b00000110;\n\t}\n\twriteControlByte(temp_buffer, 0);\n}\n\nvoid DS3231::turnOffAlarm(byte Alarm) {\n\t// turns off alarm number \"Alarm\". Defaults to 2 if Alarm is not 1.\n\t// Leaves interrupt pin alone.\n\tbyte temp_buffer = readControlByte(0);\n\t// modify control byte\n\tif (Alarm == 1) {\n\t\ttemp_buffer = temp_buffer & 0b11111110;\n\t} else {\n\t\ttemp_buffer = temp_buffer & 0b11111101;\n\t}\n\twriteControlByte(temp_buffer, 1);\n}\n\nbool DS3231::checkAlarmEnabled(byte Alarm) {\n\t// Checks whether the given alarm is enabled.\n\tbyte result = 0x0;\n\tbyte temp_buffer = readControlByte(0);\n\tif (Alarm == 1) {\n\t\tresult = temp_buffer & 0b00000001;\n\t} else {\n\t\tresult = temp_buffer & 0b00000010;\n\t}\n\treturn result;\n}\n\nbool DS3231::checkIfAlarm(byte Alarm) {\n\t// Checks whether alarm 1 or alarm 2 flag is on, returns T/F accordingly.\n\t// Turns flag off, also.\n\t// defaults to checking alarm 2, unless Alarm == 1.\n\tbyte result;\n\tbyte temp_buffer = readControlByte(1);\n\tif (Alarm == 1) {\n\t\t// Did alarm 1 go off?\n\t\tresult = temp_buffer & 0b00000001;\n\t\t// clear flag\n\t\ttemp_buffer = temp_buffer & 0b11111110;\n\t} else {\n\t\t// Did alarm 2 go off?\n\t\tresult = temp_buffer & 0b00000010;\n\t\t// clear flag\n\t\ttemp_buffer = temp_buffer & 0b11111101;\n\t}\n\twriteControlByte(temp_buffer, 1);\n\treturn result;\n}\n\nvoid DS3231::enableOscillator(bool TF, bool battery, byte frequency) {\n\t// turns oscillator on or off. True is on, false is off.\n\t// if battery is true, turns on even for battery-only operation,\n\t// otherwise turns off if Vcc is off.\n\t// frequency must be 0, 1, 2, or 3.\n\t// 0 = 1 Hz\n\t// 1 = 1.024 kHz\n\t// 2 = 4.096 kHz\n\t// 3 = 8.192 kHz (Default if frequency byte is out of range)\n\tif (frequency > 3) frequency = 3;\n\t// read control byte in, but zero out current state of RS2 and RS1.\n\tbyte temp_buffer = readControlByte(0) & 0b11100111;\n\tif (battery) {\n\t\t// turn on BBSQW flag\n\t\ttemp_buffer = temp_buffer | 0b01000000;\n\t} else {\n\t\t// turn off BBSQW flag\n\t\ttemp_buffer = temp_buffer & 0b10111111;\n\t}\n\tif (TF) {\n\t\t// set ~EOSC to 0 and INTCN to zero.\n\t\ttemp_buffer = temp_buffer & 0b01111011;\n\t} else {\n\t\t// set ~EOSC to 1, leave INTCN as is.\n\t\ttemp_buffer = temp_buffer | 0b10000000;\n\t}\n\t// shift frequency into bits 3 and 4 and set.\n\tfrequency = frequency << 3;\n\ttemp_buffer = temp_buffer | frequency;\n\t// And write the control bits\n\twriteControlByte(temp_buffer, 0);\n}\n\nvoid DS3231::enable32kHz(bool TF) {\n\t// turn 32kHz pin on or off\n\tbyte temp_buffer = readControlByte(1);\n\tif (TF) {\n\t\t// turn on 32kHz pin\n\t\ttemp_buffer = temp_buffer | 0b00001000;\n\t} else {\n\t\t// turn off 32kHz pin\n\t\ttemp_buffer = temp_buffer & 0b11110111;\n\t}\n\twriteControlByte(temp_buffer, 1);\n}\n\nbool DS3231::oscillatorCheck() {\n\t// Returns false if the oscillator has been off for some reason.\n\t// If this is the case, the time is probably not correct.\n\tbyte temp_buffer = readControlByte(1);\n\tbool result = true;\n\tif (temp_buffer & 0b10000000) {\n\t\t// Oscillator Stop Flag (OSF) is set, so return false.\n\t\tresult = false;\n\t}\n\treturn result;\n}\n\n/***************************************** \n\tPrivate Functions\n *****************************************/\n\nbyte DS3231::decToBcd(byte val) {\n// Convert normal decimal numbers to binary coded decimal\n\treturn ( (val/10*16) + (val%10) );\n}\n\nbyte DS3231::bcdToDec(byte val) {\n// Convert binary coded decimal to normal decimal numbers\n\treturn ( (val/16*10) + (val%16) );\n}\n\nbyte DS3231::readControlByte(bool which) {\n\t// Read selected control byte\n\t// first byte (0) is 0x0e, second (1) is 0x0f\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\tif (which) {\n\t\t// second control byte\n\t\t_Wire.write(0x0f);\n\t} else {\n\t\t// first control byte\n\t\t_Wire.write(0x0e);\n\t}\n\t_Wire.endTransmission();\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn _Wire.read();\t\n}\n\nvoid DS3231::writeControlByte(byte control, bool which) {\n\t// Write the selected control byte.\n\t// which=false -> 0x0e, true->0x0f.\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\tif (which) {\n\t\t_Wire.write(0x0f);\n\t} else {\n\t\t_Wire.write(0x0e);\n\t}\n\t_Wire.write(control);\n\t_Wire.endTransmission();\n}\n\n" }, { filename: "src/DS3231.h", code: "/*\n * DS3231.h\n *\n * Arduino Library for the DS3231 Real-Time Clock chip\n *\n * (c) Eric Ayars\n * 4/1/11\n * released into the public domain. If you use this, please let me know\n * (just out of pure curiosity!) by sending me an email:\n * eric@ayars.org\n *\n */\n\n// Modified by Andy Wickert 5/15/11: Spliced in stuff from RTClib\n// Modified by Simon Gassner 11/28/2017: Changed Term \"PM\" to \"PM_time\" for compability with SAMD Processors\n#ifndef DS3231_h\n#define DS3231_h\n\n// Changed the following to work on 1.0\n//#include \"WProgram.h\"\n#include \n#include \n#include \n\n// DateTime (get everything at once) from JeeLabs / Adafruit\n// Simple general-purpose date/time class (no TZ / DST / leap second handling!)\nclass DateTime {\npublic:\n DateTime (uint32_t t =0);\n DateTime (uint16_t year, uint8_t month, uint8_t day,\n uint8_t hour =0, uint8_t min =0, uint8_t sec =0);\n DateTime (const char* date, const char* time);\n uint16_t year() const { return 2000 + yOff; }\n uint8_t month() const { return m; }\n uint8_t day() const { return d; }\n uint8_t hour() const { return hh; }\n uint8_t minute() const { return mm; }\n uint8_t second() const { return ss; }\n uint8_t dayOfTheWeek() const;\n\n // 32-bit times as seconds since 1/1/2000\n long secondstime() const;\n // 32-bit times as seconds since 1/1/1970\n // THE ABOVE COMMENT IS CORRECT FOR LOCAL TIME; TO USE THIS COMMAND TO\n // OBTAIN TRUE UNIX TIME SINCE EPOCH, YOU MUST CALL THIS COMMAND AFTER\n // SETTING YOUR CLOCK TO UTC\n uint32_t unixtime(void) const;\nprotected:\n uint8_t yOff, m, d, hh, mm, ss;\n};\n\n//checks if a year is a leap year\nbool isleapYear(const uint8_t);\n\nclass RTClib {\n public:\n\t\t// Get date and time snapshot\n static DateTime now(TwoWire & _Wire = Wire);\n};\n\n// Eric's original code is everything below this line\nclass DS3231 {\n\tpublic:\n\t\t\t\n\t\t//Constructor\n\t\tDS3231();\n\t\tDS3231(TwoWire & w);\n\n\t\tTwoWire & _Wire;\n\n\t\t// Time-retrieval functions\n \n\t\t// the get*() functions retrieve current values of the registers.\n\t\tbyte getSecond(); \n\t\tbyte getMinute(); \n\t\tbyte getHour(bool& h12, bool& PM_time); \n\t\t\t// In addition to returning the hour register, this function\n\t\t\t// returns the values of the 12/24-hour flag and the AM/PM flag.\n\t\tbyte getDoW(); \n\t\tbyte getDate(); \n\t\tbyte getMonth(bool& Century); \n\t\t\t// Also sets the flag indicating century roll-over.\n\t\tbyte getYear(); \n\t\t\t// Last 2 digits only\n\n\t\t// Time-setting functions\n\t\t// Note that none of these check for sensibility: You can set the\n\t\t// date to July 42nd and strange things will probably result.\n\t\t\n\t\t// set epoch function gives the epoch as parameter and feeds the RTC\n\t\t// epoch = UnixTime and starts at 01.01.1970 00:00:00\n\t\tvoid setEpoch(time_t epoch = 0, bool flag_localtime = false);\n\n\t\tvoid setSecond(byte Second); \n\t\t\t// In addition to setting the seconds, this clears the \n\t\t\t// \"Oscillator Stop Flag\".\n\t\tvoid setMinute(byte Minute); \n\t\t\t// Sets the minute\n\t\tvoid setHour(byte Hour); \n\t\t\t// Sets the hour\n\t\tvoid setDoW(byte DoW); \n\t\t\t// Sets the Day of the Week (1-7);\n\t\tvoid setDate(byte Date); \n\t\t\t// Sets the Date of the Month\n\t\tvoid setMonth(byte Month); \n\t\t\t// Sets the Month of the year\n\t\tvoid setYear(byte Year); \n\t\t\t// Last two digits of the year\n\t\tvoid setClockMode(bool h12); \n\t\t\t// Set 12/24h mode. True is 12-h, false is 24-hour.\n\n\t\t// Temperature function\n\n\t\tfloat getTemperature(); \n\n\t\t// Alarm functions\n\t\t\n\t\tvoid getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM); \n/* Retrieves everything you could want to know about alarm\n * one. \n * A1Dy true makes the alarm go on A1Day = Day of Week,\n * A1Dy false makes the alarm go on A1Day = Date of month.\n *\n * byte AlarmBits sets the behavior of the alarms:\n *\tDy\tA1M4\tA1M3\tA1M2\tA1M1\tRate\n *\tX\t1\t\t1\t\t1\t\t1\t\tOnce per second\n *\tX\t1\t\t1\t\t1\t\t0\t\tAlarm when seconds match\n *\tX\t1\t\t1\t\t0\t\t0\t\tAlarm when min, sec match\n *\tX\t1\t\t0\t\t0\t\t0\t\tAlarm when hour, min, sec match\n *\t0\t0\t\t0\t\t0\t\t0\t\tAlarm when date, h, m, s match\n *\t1\t0\t\t0\t\t0\t\t0\t\tAlarm when DoW, h, m, s match\n *\n *\tDy\tA2M4\tA2M3\tA2M2\tRate\n *\tX\t1\t\t1\t\t1\t\tOnce per minute (at seconds = 00)\n *\tX\t1\t\t1\t\t0\t\tAlarm when minutes match\n *\tX\t1\t\t0\t\t0\t\tAlarm when hours and minutes match\n *\t0\t0\t\t0\t\t0\t\tAlarm when date, hour, min match\n *\t1\t0\t\t0\t\t0\t\tAlarm when DoW, hour, min match\n */\n\t\tvoid getA2Time(byte& A2Day, byte& A2Hour, byte& A2Minute, byte& AlarmBits, bool& A2Dy, bool& A2h12, bool& A2PM); \n\t\t\t// Same as getA1Time();, but A2 only goes on seconds == 00.\n\t\tvoid setA1Time(byte A1Day, byte A1Hour, byte A1Minute, byte A1Second, byte AlarmBits, bool A1Dy, bool A1h12, bool A1PM); \n\t\t\t// Set the details for Alarm 1\n\t\tvoid setA2Time(byte A2Day, byte A2Hour, byte A2Minute, byte AlarmBits, bool A2Dy, bool A2h12, bool A2PM); \n\t\t\t// Set the details for Alarm 2\n\t\tvoid turnOnAlarm(byte Alarm); \n\t\t\t// Enables alarm 1 or 2 and the external interrupt pin.\n\t\t\t// If Alarm != 1, it assumes Alarm == 2.\n\t\tvoid turnOffAlarm(byte Alarm); \n\t\t\t// Disables alarm 1 or 2 (default is 2 if Alarm != 1);\n\t\t\t// and leaves the interrupt pin alone.\n\t\tbool checkAlarmEnabled(byte Alarm); \n\t\t\t// Returns T/F to indicate whether the requested alarm is\n\t\t\t// enabled. Defaults to 2 if Alarm != 1.\n\t\tbool checkIfAlarm(byte Alarm); \n\t\t\t// Checks whether the indicated alarm (1 or 2, 2 default);\n\t\t\t// has been activated.\n\n\t\t// Oscillator functions\n\n\t\tvoid enableOscillator(bool TF, bool battery, byte frequency); \n\t\t\t// turns oscillator on or off. True is on, false is off.\n\t\t\t// if battery is true, turns on even for battery-only operation,\n\t\t\t// otherwise turns off if Vcc is off.\n\t\t\t// frequency must be 0, 1, 2, or 3.\n\t\t\t// 0 = 1 Hz\n\t\t\t// 1 = 1.024 kHz\n\t\t\t// 2 = 4.096 kHz\n\t\t\t// 3 = 8.192 kHz (Default if frequency byte is out of range);\n\t\tvoid enable32kHz(bool TF); \n\t\t\t// Turns the 32kHz output pin on (true); or off (false).\n\t\tbool oscillatorCheck();;\n\t\t\t// Checks the status of the OSF (Oscillator Stop Flag);.\n\t\t\t// If this returns false, then the clock is probably not\n\t\t\t// giving you the correct time.\n\t\t\t// The OSF is cleared by function setSecond();.\n\n\tprivate:\n\n\t\tbyte decToBcd(byte val); \n\t\t\t// Convert normal decimal numbers to binary coded decimal\n\t\tbyte bcdToDec(byte val); \n\t\t\t// Convert binary coded decimal to normal decimal numbers\n\n\tprotected:\n\n\t\tbyte readControlByte(bool which); \n\t\t\t// Read selected control byte: (0); reads 0x0e, (1) reads 0x0f\n\t\tvoid writeControlByte(byte control, bool which); \n\t\t\t// Write the selected control byte. \n\t\t\t// which == false -> 0x0e, true->0x0f.\n\n};\n\n#endif\n" }, { filename: "src/LowPower.cpp", code: "/*******************************************************************************\n* LowPower Library\n* Version: 1.81\n* Date: 21-01-2020\n* Author: Lim Phang Moh\n* Company: Rocket Scream Electronics\n* Website: www.rocketscream.com\n*\n* This is a lightweight low power library for Arduino.\n*\n* This library is licensed under Creative Commons Attribution-ShareAlike 3.0\n* Unported License.\n*\n* Revision Description\n* ======== ===========\n* 1.81 Fixed timer 2 settings incorrectly restored after sleep.\n* Contributed by rwared11.\n* 1.80 Added support for ATmega88 and ATmega168P. PowerExtStandby()\n* modified because not supported on Atmega88 / Atmega168\n* Contributed by mrguen.\n* 1.70 Added support for ATmega644P and ATmega1284P.\n* Contributed by alexreinert.\n* 1.60 Added support for ATmega256RFR2. Contributed by Rodmg.\n* 1.50 Fixed compiler optimization (Arduino IDE 1.6.x branch) on BOD enable\n* function that causes the function to be over optimized.\n* 1.40\t\tAdded support for ATSAMD21G18A.\n* \t\t\tLibrary format compliant with Arduino IDE 1.5.x.\n* 1.30\t\tAdded support for ATMega168, ATMega2560, ATMega1280 & ATMega32U4.\n*\t\t\tTested to work with Arduino IDE 1.0.1 - 1.0.4.\n* 1.20\t\tRemove typo error in idle method for checking whether Timer 0 was\n*\t\t\tturned off.\n*\t\t\tRemove dependecy on WProgram.h which is not required.\n*\t\t\tTested to work with Arduino IDE 1.0.\n* 1.10\t\tAdded #ifndef for sleep_bod_disable() for compatibility with future\n*\t\t\tArduino IDE release.\n* 1.00 Initial public release.\n*******************************************************************************/\n#if defined (__AVR__)\n\t#include \n\t#include \n\t#include \n\t#include \n#elif defined (__arm__)\n\n#else\n\t#error \"Processor architecture is not supported.\"\n#endif\n\n#include \"LowPower.h\"\n\n#if defined (__AVR__)\n// Only Pico Power devices can change BOD settings through software\n#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__)\n#ifndef sleep_bod_disable\n#define sleep_bod_disable() \t\t\t\t\t\t\t\t\t\t\\\ndo { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n unsigned char tempreg; \t\t\t\t\t\t\t\t\t\t\t\t\t\\\n __asm__ __volatile__(\"in %[tempreg], %[mcucr]\" \"\\n\\t\" \t\t\t\\\n \"ori %[tempreg], %[bods_bodse]\" \"\\n\\t\" \t\t\\\n \"out %[mcucr], %[tempreg]\" \"\\n\\t\" \t\t\t\\\n \"andi %[tempreg], %[not_bodse]\" \"\\n\\t\" \t\t\\\n \"out %[mcucr], %[tempreg]\" \t\t\t\t\t\\\n : [tempreg] \"=&d\" (tempreg) \t\t\t\t\t\\\n : [mcucr] \"I\" _SFR_IO_ADDR(MCUCR), \t\t\t\\\n [bods_bodse] \"i\" (_BV(BODS) | _BV(BODSE)), \\\n [not_bodse] \"i\" (~_BV(BODSE))); \t\t\t\\\n} while (0)\n#endif\n#endif\n\n#define\tlowPowerBodOn(mode)\t\\\ndo { \t\t\t\t\t\t\\\n set_sleep_mode(mode); \\\n cli();\t\t\t\t\\\n sleep_enable();\t\t\\\n sei();\t\t\t\t\\\n sleep_cpu();\t\t\t\\\n sleep_disable();\t\t\\\n sei();\t\t\t\t\\\n} while (0);\n\n// Only Pico Power devices can change BOD settings through software\n#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n#define\tlowPowerBodOff(mode)\\\ndo { \t\t\t\t\t\t\\\n set_sleep_mode(mode); \\\n cli();\t\t\t\t\\\n sleep_enable();\t\t\\\n\t\t\tsleep_bod_disable(); \\\n sei();\t\t\t\t\\\n sleep_cpu();\t\t\t\\\n sleep_disable();\t\t\\\n sei();\t\t\t\t\\\n} while (0);\n#endif\n\n// Some macros is still missing from AVR GCC distribution for ATmega32U4\n#if defined __AVR_ATmega32U4__\n\t// Timer 4 PRR bit is currently not defined in iom32u4.h\n\t#ifndef PRTIM4\n\t\t#define PRTIM4 4\n\t#endif\n\n\t// Timer 4 power reduction macro is not defined currently in power.h\n\t#ifndef power_timer4_disable\n\t\t#define power_timer4_disable()\t(PRR1 |= (uint8_t)(1 << PRTIM4))\n\t#endif\n\n\t#ifndef power_timer4_enable\n\t\t#define power_timer4_enable()\t\t(PRR1 &= (uint8_t)~(1 << PRTIM4))\n\t#endif\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega328P/168 into idle state. Please make sure you\n*\t\t\t understand the implication and result of disabling module.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n* 4. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 5. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 6. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 7. usart0\t\tUSART0 module disable control:\n*\t\t\t\t(a) USART0_OFF - Turn off USART0 module\n*\t\t\t\t(b) USART0_ON - Leave USART0 module in its default state\n*\n* 8. twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n*******************************************************************************/\n#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168__) || defined (__AVR_ATmega168P__) || defined (__AVR_ATmega88__)\nvoid\tLowPowerClass::idle(period_t period, adc_t adc, timer2_t timer2,\n\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0,\n\t\t\t\t\t\t\tspi_t spi, usart0_t usart0,\ttwi_t twi)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\n\t\tpower_timer2_disable();\n\t}\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_disable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_disable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n \n\t\tpower_timer2_enable();\n\t}\n\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_enable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_enable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_enable();\n}\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega32U4 into idle state. Please make sure you\n*\t\t\t understand the implication and result of disabling module.\n*\t\t\t Take note that Timer 2 is not available and USART0 is replaced\n* \t\t\t with USART1 on ATmega32U4.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer4\t\tTimer 4 module disable control:\n*\t\t\t\t(a) TIMER4_OFF - Turn off Timer 4 module\n*\t\t\t\t(b) TIMER4_ON - Leave Timer 4 module in its default state\n*\n* 4. timer3\t\tTimer 3 module disable control:\n*\t\t\t\t(a) TIMER3_OFF - Turn off Timer 3 module\n*\t\t\t\t(b) TIMER3_ON - Leave Timer 3 module in its default state\n*\n* 5. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 6. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 7. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 8. usart1\t\tUSART1 module disable control:\n*\t\t\t\t(a) USART1_OFF - Turn off USART1 module\n*\t\t\t\t(b) USART1_ON - Leave USART1 module in its default state\n*\n* 9. twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n* 10.usb\t\tUSB module disable control:\n*\t\t\t\t(a) USB_OFF - Turn off USB module\n*\t\t\t\t(b) USB_ON - Leave USB module in its default state\n*******************************************************************************/\n#if defined __AVR_ATmega32U4__\nvoid\tLowPowerClass::idle(period_t period, adc_t adc,\n\t\t\t\t\t\t\ttimer4_t timer4, timer3_t timer3,\n\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0,\n\t\t\t\t\t\t\tspi_t spi, usart1_t usart1,\ttwi_t twi, usb_t usb)\n{\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_disable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_disable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_disable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_disable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_disable();\n\tif (usb == USB_OFF)\t\t\tpower_usb_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_enable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_enable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_enable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_enable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_enable();\n\tif (usb == USB_OFF)\t\t\tpower_usb_enable();\n}\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega644P & ATmega1284P into idle state. Please make sure\n*\t\t\t you understand the implication and result of disabling module.\n*\t\t\t Take note that extra USART 1 compared to an ATmega328P/168.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n* 4. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 5. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 6. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 7. usart1\t\tUSART1 module disable control:\n*\t\t\t\t(a) USART1_OFF - Turn off USART1 module\n*\t\t\t\t(b) USART1_ON - Leave USART1 module in its default state\n*\n* 8. usart0\t\tUSART0 module disable control:\n*\t\t\t\t(a) USART0_OFF - Turn off USART0 module\n*\t\t\t\t(b) USART0_ON - Leave USART0 module in its default state\n*\n* 9. twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n*******************************************************************************/\n#if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega1284P__)\nvoid\tLowPowerClass::idle(period_t period, adc_t adc, timer2_t timer2,\n\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\tusart1_t usart1, usart0_t usart0, twi_t twi)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\n\t\tpower_timer2_disable();\n\t}\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t power_spi_disable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_disable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_disable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\n\t\tpower_timer2_enable();\n\t}\n\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_enable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_enable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_enable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_enable();\n}\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega2560 & ATmega1280 into idle state. Please make sure\n*\t\t\t you understand the implication and result of disabling module.\n*\t\t\t Take note that extra Timer 5, 4, 3 compared to an ATmega328P/168.\n*\t\t\t Also take note that extra USART 3, 2, 1 compared to an\n*\t\t\t ATmega328P/168.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer5\t\tTimer 5 module disable control:\n*\t\t\t\t(a) TIMER5_OFF - Turn off Timer 5 module\n*\t\t\t\t(b) TIMER5_ON - Leave Timer 5 module in its default state\n*\n* 4. timer4\t\tTimer 4 module disable control:\n*\t\t\t\t(a) TIMER4_OFF - Turn off Timer 4 module\n*\t\t\t\t(b) TIMER4_ON - Leave Timer 4 module in its default state\n*\n* 5. timer3\t\tTimer 3 module disable control:\n*\t\t\t\t(a) TIMER3_OFF - Turn off Timer 3 module\n*\t\t\t\t(b) TIMER3_ON - Leave Timer 3 module in its default state\n*\n* 6. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n* 7. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 8. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 9. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 10.usart3\t\tUSART3 module disable control:\n*\t\t\t\t(a) USART3_OFF - Turn off USART3 module\n*\t\t\t\t(b) USART3_ON - Leave USART3 module in its default state\n*\n* 11.usart2\t\tUSART2 module disable control:\n*\t\t\t\t(a) USART2_OFF - Turn off USART2 module\n*\t\t\t\t(b) USART2_ON - Leave USART2 module in its default state\n*\n* 12.usart1\t\tUSART1 module disable control:\n*\t\t\t\t(a) USART1_OFF - Turn off USART1 module\n*\t\t\t\t(b) USART1_ON - Leave USART1 module in its default state\n*\n* 13.usart0\t\tUSART0 module disable control:\n*\t\t\t\t(a) USART0_OFF - Turn off USART0 module\n*\t\t\t\t(b) USART0_ON - Leave USART0 module in its default state\n*\n* 14.twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n*******************************************************************************/\n#if defined (__AVR_ATmega2560__) || defined (__AVR_ATmega1280__)\nvoid\tLowPowerClass::idle(period_t period, adc_t adc, timer5_t timer5,\n\t\t\t\t\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\n\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\tusart3_t usart3, usart2_t usart2, usart1_t usart1,\n\t\t\t usart0_t usart0, twi_t twi)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\n\t\tpower_timer2_disable();\n\t}\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer5 == TIMER5_OFF)\tpower_timer5_disable();\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_disable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_disable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t power_spi_disable();\n\tif (usart3 == USART3_OFF)\tpower_usart3_disable();\n\tif (usart2 == USART2_OFF)\tpower_usart2_disable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_disable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_disable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\n\t\tpower_timer2_enable();\n\t}\n\n\tif (timer5 == TIMER5_OFF)\tpower_timer5_enable();\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_enable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_enable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_enable();\n\tif (usart3 == USART3_OFF)\tpower_usart3_enable();\n\tif (usart2 == USART2_OFF)\tpower_usart2_enable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_enable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_enable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_enable();\n}\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega256RFR2 into idle state. Please make sure\n*\t\t\t you understand the implication and result of disabling module.\n*\t\t\t Take note that extra Timer 5, 4, 3 compared to an ATmega328P/168.\n*\t\t\t Also take note that extra USART 1 compared to an\n*\t\t\t ATmega328P/168.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer5\t\tTimer 5 module disable control:\n*\t\t\t\t(a) TIMER5_OFF - Turn off Timer 5 module\n*\t\t\t\t(b) TIMER5_ON - Leave Timer 5 module in its default state\n*\n* 4. timer4\t\tTimer 4 module disable control:\n*\t\t\t\t(a) TIMER4_OFF - Turn off Timer 4 module\n*\t\t\t\t(b) TIMER4_ON - Leave Timer 4 module in its default state\n*\n* 5. timer3\t\tTimer 3 module disable control:\n*\t\t\t\t(a) TIMER3_OFF - Turn off Timer 3 module\n*\t\t\t\t(b) TIMER3_ON - Leave Timer 3 module in its default state\n*\n* 6. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n* 7. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 8. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 9. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 10.usart1\t\tUSART1 module disable control:\n*\t\t\t\t(a) USART1_OFF - Turn off USART1 module\n*\t\t\t\t(b) USART1_ON - Leave USART1 module in its default state\n*\n* 11.usart0\t\tUSART0 module disable control:\n*\t\t\t\t(a) USART0_OFF - Turn off USART0 module\n*\t\t\t\t(b) USART0_ON - Leave USART0 module in its default state\n*\n* 12.twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n*******************************************************************************/\n#if defined (__AVR_ATmega256RFR2__)\nvoid\tLowPowerClass::idle(period_t period, adc_t adc, timer5_t timer5,\n\t\t\t\t\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\t\t\t\t\t\t\tusart1_t usart1,\n\t\t\t usart0_t usart0, twi_t twi)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\n\t\tpower_timer2_disable();\n\t}\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer5 == TIMER5_OFF)\tpower_timer5_disable();\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_disable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_disable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t\t power_spi_disable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_disable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_disable();\n\tif (twi == TWI_OFF)\t\t\t power_twi_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\n\t\tpower_timer2_enable();\n\t}\n\n\tif (timer5 == TIMER5_OFF)\tpower_timer5_enable();\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_enable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_enable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\t power_spi_enable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_enable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_enable();\n\tif (twi == TWI_OFF)\t\t\t power_twi_enable();\n}\n#endif\n\n\n/*******************************************************************************\n* Name: adcNoiseReduction\n* Description: Putting microcontroller into ADC noise reduction state. This is\n*\t\t\t a very useful state when using the ADC to achieve best and low\n* noise signal.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control. Turning off the ADC module is\n*\t\t\t\tbasically removing the purpose of this low power mode.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::adcNoiseReduction(period_t period, adc_t adc,\n\t\t\t\t\t\t\t\t\t\t timer2_t timer2)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\t}\n\t#endif\n\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_ADC);\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\t}\n\t#endif\n}\n\n/*******************************************************************************\n* Name: powerDown\n* Description: Putting microcontroller into power down state. This is\n*\t\t\t the lowest current consumption state. Use this together with\n*\t\t\t external pin interrupt to wake up through external event\n*\t\t\t triggering (example: RTC clockout pin, SD card detect pin).\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control. Turning off the ADC module is\n*\t\t\t\tbasically removing the purpose of this low power mode.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. bod\t\tBrown Out Detector (BOD) module disable control:\n*\t\t\t\t(a) BOD_OFF - Turn off BOD module\n*\t\t\t\t(b) BOD_ON - Leave BOD module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::powerDown(period_t period, adc_t adc, bod_t bod)\n{\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\tif (bod == BOD_OFF)\n\t{\n\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n\t\t\tlowPowerBodOff(SLEEP_MODE_PWR_DOWN);\n\t\t#else\n\t\t\tlowPowerBodOn(SLEEP_MODE_PWR_DOWN);\n\t\t#endif\n\t}\n\telse\n\t{\n\t\tlowPowerBodOn(SLEEP_MODE_PWR_DOWN);\n\t}\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n}\n\n/*******************************************************************************\n* Name: powerSave\n* Description: Putting microcontroller into power save state. This is\n*\t\t\t the lowest current consumption state after power down.\n*\t\t\t Use this state together with an external 32.768 kHz crystal (but\n*\t\t\t 8/16 MHz crystal/resonator need to be removed) to provide an\n*\t\t\t asynchronous clock source to Timer 2. Please take note that\n*\t\t\t Timer 2 is also used by the Arduino core for PWM operation.\n*\t\t\t Please refer to wiring.c for explanation. Removal of the external\n*\t\t\t 8/16 MHz crystal/resonator requires the microcontroller to run\n*\t\t\t on its internal RC oscillator which is not so accurate for time\n*\t\t\t critical operation.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control. Turning off the ADC module is\n*\t\t\t\tbasically removing the purpose of this low power mode.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. bod\t\tBrown Out Detector (BOD) module disable control:\n*\t\t\t\t(a) BOD_OFF - Turn off BOD module\n*\t\t\t\t(b) BOD_ON - Leave BOD module in its default state\n*\n* 4. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::powerSave(period_t period, adc_t adc, bod_t bod,\n\t\t\t\t\t\t\t timer2_t timer2)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\t}\n\t#endif\n\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tif (bod == BOD_OFF)\n\t{\n\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n\t\t\tlowPowerBodOff(SLEEP_MODE_PWR_SAVE);\n\t\t#else\n\t\t\tlowPowerBodOn(SLEEP_MODE_PWR_SAVE);\n\t\t#endif\n\t}\n\telse\n\t{\n\t\tlowPowerBodOn(SLEEP_MODE_PWR_SAVE);\n\t}\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\t}\n\t#endif\n}\n\n/*******************************************************************************\n* Name: powerStandby\n* Description: Putting microcontroller into power standby state.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control. Turning off the ADC module is\n*\t\t\t\tbasically removing the purpose of this low power mode.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. bod\t\tBrown Out Detector (BOD) module disable control:\n*\t\t\t\t(a) BOD_OFF - Turn off BOD module\n*\t\t\t\t(b) BOD_ON - Leave BOD module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::powerStandby(period_t period, adc_t adc, bod_t bod)\n{\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tif (bod == BOD_OFF)\n\t{\n\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n\t\t\tlowPowerBodOff(SLEEP_MODE_STANDBY);\n\t\t#else\n\t\t\tlowPowerBodOn(SLEEP_MODE_STANDBY);\n\t\t#endif\n\t}\n\telse\n\t{\n\t\tlowPowerBodOn(SLEEP_MODE_STANDBY);\n\t}\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n}\n\n/*******************************************************************************\n* Name: powerExtStandby\n* Description: Putting microcontroller into power extended standby state. This\n*\t\t\t is different from the power standby state as it has the\n*\t\t\t capability to run Timer 2 asynchronously.\n* Not implemented on Atmega88 and Atmega168.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. bod\t\tBrown Out Detector (BOD) module disable control:\n*\t\t\t\t(a) BOD_OFF - Turn off BOD module\n*\t\t\t\t(b) BOD_ON - Leave BOD module in its default state\n*\n* 4. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::powerExtStandby(period_t period, adc_t adc, bod_t bod,\n\t\t\t\t\t\t\t\t\t timer2_t timer2)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\t}\n\t#endif\n\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\n\t#if defined (__AVR_ATmega88__) || defined (__AVR_ATmega168__) // SLEEP_MODE_EXT_STANDBY not implemented on Atmega88 / Atmega168\n\t#else\n\t\tif (bod == BOD_OFF)\n\t\t{\n\t\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n\t\t\t\tlowPowerBodOff(SLEEP_MODE_EXT_STANDBY);\n\t\t\t#else\n\t\t\t\tlowPowerBodOn(SLEEP_MODE_EXT_STANDBY);\n\t\t\t#endif\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlowPowerBodOn(SLEEP_MODE_EXT_STANDBY);\n\t\t}\n\t#endif\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\t}\n\t#endif\n}\n\n// sleep # of milliseconds using WDT (watchdog timer - accurate to within 10%, uses about 3uA)\nvoid LowPowerClass::longPowerDown(uint32_t sleepTime) {\n do {\n if (sleepTime > 8000)\n {\n powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);\n sleepTime-=8000;\n }\n else if (sleepTime > 4000)\n {\n powerDown(SLEEP_4S, ADC_OFF, BOD_OFF);\n sleepTime-=4000;\n }\n else if (sleepTime > 2000)\n {\n powerDown(SLEEP_2S, ADC_OFF, BOD_OFF);\n sleepTime-=2000;\n }\n else if (sleepTime > 1000)\n {\n powerDown(SLEEP_1S, ADC_OFF, BOD_OFF);\n sleepTime-=1000;\n }\n else if (sleepTime > 512)\n {\n powerDown(SLEEP_500MS, ADC_OFF, BOD_OFF);\n sleepTime-=512;\n }\n else if (sleepTime > 256)\n {\n powerDown(SLEEP_250MS, ADC_OFF, BOD_OFF);\n sleepTime-=256;\n }\n else if (sleepTime > 128)\n {\n powerDown(SLEEP_120MS, ADC_OFF, BOD_OFF);\n sleepTime-=128;\n }\n else if (sleepTime > 64)\n {\n powerDown(SLEEP_60MS, ADC_OFF, BOD_OFF);\n sleepTime-=64;\n }\n else if (sleepTime > 32)\n {\n powerDown(SLEEP_30MS, ADC_OFF, BOD_OFF);\n sleepTime-=32;\n }\n else if (sleepTime > 16)\n {\n powerDown(SLEEP_15MS, ADC_OFF, BOD_OFF);\n sleepTime-=16;\n }\n else\n {\n sleepTime=0;\n }\n } while(sleepTime);\n}\n\n/*******************************************************************************\n* Name: ISR (WDT_vect)\n* Description: Watchdog Timer interrupt service routine. This routine is\n*\t\t required to allow automatic WDIF and WDIE bit clearance in\n*\t\t\t hardware.\n*\n*******************************************************************************/\nISR (WDT_vect)\n{\n\t// WDIE & WDIF is cleared in hardware upon entering this ISR\n\twdt_disable();\n}\n\n#elif defined(__arm__)\n#if defined(__SAMD21__) || defined(ARDUINO_SAMD_ZERO)\n/*******************************************************************************\n* Name: standby\n* Description: Putting SAMD21G18A into idle mode. This is the lowest current\n* consumption mode. Requires separate handling of clock and\n* \t\t\t peripheral management (disabling and shutting down) to achieve\n* \t\t\t the desired current consumption.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. idleMode Idle mode level (0, 1, 2) where IDLE_2 level provide lowest\n* \t\t\t\tcurrent consumption in this mode.\n*\n*******************************************************************************/\nvoid\tLowPowerClass::idle(idle_t idleMode)\n{\n\tSCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;\n\tPM->SLEEP.reg = idleMode;\n\t__DSB();\n\t__WFI();\n}\n\n/*******************************************************************************\n* Name: standby\n* Description: Putting SAMD21G18A into standby mode. This is the lowest current\n* consumption mode. Use this together with the built-in RTC (use\n* RTCZero library) or external pin interrupt to wake up through\n* external event triggering.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. NIL\n*\n*******************************************************************************/\nvoid\tLowPowerClass::standby()\n{\n\tSCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;\n\t__DSB();\n\t__WFI();\n}\n\n#else\n\t#error \"Please ensure chosen MCU is a SAMD21\"\n#endif\n#else\n\t#error \"Processor architecture is not supported.\"\n#endif\n\nLowPowerClass LowPower;" }, { filename: "src/LowPower.h", code: "#ifndef LowPower_h\n#define LowPower_h\n\n#include \"Arduino.h\"\n\nenum period_t\n{\n\tSLEEP_15MS,\n\tSLEEP_30MS,\n\tSLEEP_60MS,\n\tSLEEP_120MS,\n\tSLEEP_250MS,\n\tSLEEP_500MS,\n\tSLEEP_1S,\n\tSLEEP_2S,\n\tSLEEP_4S,\n\tSLEEP_8S,\n\tSLEEP_FOREVER\n};\n\nenum bod_t\n{\n\tBOD_OFF,\n\tBOD_ON\n};\n\nenum adc_t\n{\n\tADC_OFF,\n\tADC_ON\n};\n\nenum timer5_t\n{\n\tTIMER5_OFF,\n\tTIMER5_ON\n};\n\nenum timer4_t\n{\n\tTIMER4_OFF,\n\tTIMER4_ON\n};\n\nenum timer3_t\n{\n\tTIMER3_OFF,\n\tTIMER3_ON\n};\n\nenum timer2_t\n{\n\tTIMER2_OFF,\n\tTIMER2_ON\n};\n\nenum timer1_t\n{\n\tTIMER1_OFF,\n\tTIMER1_ON\n};\n\nenum timer0_t\n{\n\tTIMER0_OFF,\n\tTIMER0_ON\n};\n\nenum spi_t\n{\n\tSPI_OFF,\n\tSPI_ON\n};\n\nenum usart0_t\n{\n\tUSART0_OFF,\n\tUSART0_ON\n};\n\nenum usart1_t\n{\n\tUSART1_OFF,\n\tUSART1_ON\n};\n\nenum usart2_t\n{\n\tUSART2_OFF,\n\tUSART2_ON\n};\n\nenum usart3_t\n{\n\tUSART3_OFF,\n\tUSART3_ON\n};\n\nenum twi_t\n{\n\tTWI_OFF,\n\tTWI_ON\n};\n\nenum usb_t\n{\n\tUSB_OFF,\n\tUSB_ON\n};\n\nenum idle_t\n{\n\tIDLE_0,\n\tIDLE_1,\n\tIDLE_2\n};\n\nclass LowPowerClass\n{\n\tpublic:\n\t\t#if defined (__AVR__)\n\n\t\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168__) || defined (__AVR_ATmega168P__) || defined (__AVR_ATmega88__)\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer2_t timer2,\n\t\t\t\t\t\t timer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t usart0_t usart0, twi_t twi);\n\t\t\t#elif defined __AVR_ATmega644P__ || defined (__AVR_ATmega1284P__)\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer2_t timer2,\n\t\t\t\t\t\t\t timer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\t usart1_t usart1, usart0_t usart0, twi_t twi);\n\t\t\t#elif defined __AVR_ATmega2560__\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer5_t timer5,\n\t\t\t\t\t\t\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\n\t\t\t\t\t\t\t timer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\t usart3_t usart3, usart2_t usart2, usart1_t usart1,\n\t\t\t\t\t\t\t usart0_t usart0, twi_t twi);\n\t\t\t#elif defined __AVR_ATmega256RFR2__\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer5_t timer5,\n\t\t\t\t\t\t\t\t\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\n\t\t\t\t \t\t\t\t timer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t usart1_t usart1,\n\t\t\t\t\t\t\t\t\t usart0_t usart0, twi_t twi);\n\t\t\t#elif defined __AVR_ATmega32U4__\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer4_t timer4,\n\t\t\t\t timer3_t timer3, timer1_t timer1, timer0_t timer0,\n\t\t\t\t spi_t spi, usart1_t usart1, twi_t twi, usb_t usb);\n\t\t\t#else\n\t\t\t\t#error \"Please ensure chosen MCU is either 88, 168, 168P, 328P, 32U4, 2560 or 256RFR2.\"\n\t\t\t#endif\n\t\t\tvoid\tadcNoiseReduction(period_t period, adc_t adc, timer2_t timer2) __attribute__((optimize(\"-O1\")));\n\t\t\tvoid\tpowerDown(period_t period, adc_t adc, bod_t bod) __attribute__((optimize(\"-O1\")));\n\t\t\tvoid\tpowerSave(period_t period, adc_t adc, bod_t bod, timer2_t timer2) __attribute__((optimize(\"-O1\")));\n\t\t\tvoid\tpowerStandby(period_t period, adc_t adc, bod_t bod) __attribute__((optimize(\"-O1\")));\n\t\t\tvoid\tpowerExtStandby(period_t period, adc_t adc, bod_t bod, timer2_t timer2) __attribute__((optimize(\"-O1\")));\n void longPowerDown(uint32_t sleepTime);\n\t\t#elif defined (__arm__)\n\t\t\t#if defined(__SAMD21__) || defined(ARDUINO_SAMD_ZERO)\n\t\t\t\tvoid\tidle(idle_t idleMode);\n\t\t\t\tvoid\tstandby();\n\t\t\t#else\n\t\t\t\t#error \"Please ensure chosen MCU is a SAMD21\"\n\t\t\t#endif\n\n\t\t#else\n\n\t\t\t#error \"Processor architecture is not supported.\"\n\n\t\t#endif\n};\n\nextern LowPowerClass LowPower;\n#endif" }] }; const extFacePanels = {}; const ExtHandler = { onLoad: function onLoad(app, target) { const that = this; if (!that.__workerSetupInstance) { that.__workerSetupInstance = that.workerSetup({ app }).then(() => { that.worker.remote.runExtension('onLoad', target.id); }); } }, onUnload: function onUnload(app) { this.__workerSetupInstance = null; this.worker.remote.runExtension('onUnload'); this.worker.dispose(); }, onConnect: function onConnect(app, device) { this.worker.remote.runExtension('onConnect', device.id); }, onDisconnect: function onDisconnect(app, device) { this.worker.remote.runExtension('onDisconnect', device.id); }, onStopAll: function onStopAll(app, device) { this.worker.remote.runExtension('onStopAll', device.id); }, beforeChangeUploadMode: function beforeChangeUploadMode(app, device) { return this.worker.remote.runExtension('beforeChangeUploadMode', device.id); }, beforeChangeDebugMode: function beforeChangeDebugMode(app, device) { return this.worker.remote.runExtension('beforeChangeDebugMode', device.id); }, afterChangeUploadMode: function afterChangeUploadMode(app, device) { this.worker.remote.runExtension('afterChangeUploadMode', device.id); }, afterChangeDebugMode: function afterChangeDebugMode(app, device) { this.worker.remote.runExtension('afterChangeDebugMode', device.id); }, onSelect: function onSelect(app, device) { if (!this.worker) { setTimeout(() => { this.onSelect(app, device); }, 200); return; } this.worker.remote.runExtension('onSelect', device.id); }, onUnselect: function onUnselect(app, device) { this.worker.remote.runExtension('onUnselect', device.id); }, beforeCodeUpload: function beforeCodeUpload(app, device) { this.worker.remote.runExtension('beforeCodeUpload', device.id); }, afterCodeUpload: function afterCodeUpload(app, device) { this.worker.remote.runExtension('afterCodeUpload', device.id); }, onRead: function onRead(app, device) { this.worker.remote.runExtension('onRead', device.id); }, beforeFirmwareUpdate: function beforeFirmwareUpdate(app, device) { this.worker.remote.runExtension('beforeFirmwareUpdate', device.id); }, afterFirmwareUpdate: function afterFirmwareUpdate(app, device) { this.worker.remote.runExtension('afterFirmwareUpdate', device.id); } }; class ExtVdrDf3231Lowpower { constructor() { this.checkFirmwareInForce = typeof checkFirmwareInForce !== 'undefined' ? checkFirmwareInForce : false; const handlerProxyUrl = window.MbApi.getExtResPath('vdr_df3231_lowpower/handlerProxy.js', 'vdr_df3231_lowpower'); const that = this; that.workerSetup = async function (exports) { that.worker = await window.__web_worker_rpc.create(handlerProxyUrl, exports).then(worker => { worker.CONFIG.TIMEOUT = 42000; worker.CONFIG.HEARTBEAT = 4200; worker.onFail = () => { that.worker = null; that.workerSetup(exports); const app = exports.app; if (app) { app.workspace.resetEvents(); } }; return worker; }); }; this.funcs = { 'BLOCK_1656602282019': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656602282019', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } }, 'BLOCK_1656594936925': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656594936925', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } }, 'BLOCK_1656595410179': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656595410179', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } }, 'BLOCK_1656595749942': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656595749942', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } }, 'BLOCK_1656596148335': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656596148335', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } }, 'BLOCK_1656596600428': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656596600428', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } }, 'BLOCK_1656597084419': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656597084419', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } }, 'BLOCK_1656663686735': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656663686735', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } }, 'BLOCK_1656663686984': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656663686984', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } }, 'BLOCK_1656663687195': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock('BLOCK_1656663687195', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args)); } } }; } getInfo() { return { "id": "vdr_df3231_lowpower", "targets": [{ "name": "arduino_mega2560", "options": { "upload": { "middlewares": [{ "name": "arduino", "params": { "sources": extSources.arduino } }] } } }, { "name": "arduino_uno", "options": { "upload": { "middlewares": [{ "name": "arduino", "params": { "sources": extSources.arduino } }] } } }], "codeTypes": ["arduinoc"], "version": "1.0.0", "platform": ["mblockpc"], "categories": [{ "name": "cate_a925a78d", "colors": ["#B39DDB", "#9E82D1", "#8866C7"], "menuIconURI": "", "blockIcon": { "type": "image", "width": 28, "height": 26, "src": window.MbApi.getExtResPath('vdr_df3231_lowpower/imgs/98d512dcdecd49de87d221d760624838.png', 'vdr_df3231_lowpower') }, "blocks": [{ "opcode": "BLOCK_1656602282019", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": {}, "branchCount": 0, "codes": { "arduinoc": { "sections": { "include": ["\"src/DS3231.h\""], "declare": `DS3231 DS3231_clock;\r\nbool DS3231_isWakeUP = false;\r\nbool DS3231_isTime = false;\r\nint DS3231_i = 0;\r` } } }, "handler": this.funcs.BLOCK_1656602282019 }, { "opcode": "BLOCK_1656594936925", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": { "heure": { "type": "number", "defaultValue": 20 }, "minute": { "type": "number", "defaultValue": 15 }, "seconde": { "type": "number", "defaultValue": 30 } }, "branchCount": 0, "codes": { "arduinoc": { "code": `DS3231_clock.setHour(/*{heure}*/);\r\nDS3231_clock.setMinute(/*{minute}*/);\r\nDS3231_clock.setSecond(/*{seconde}*/);` } }, "handler": this.funcs.BLOCK_1656594936925 }, { "opcode": "BLOCK_1656595410179", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": { "date": { "type": "number", "defaultValue": 20 }, "mois": { "type": "number", "defaultValue": 6 }, "annee": { "type": "number", "defaultValue": 2022 } }, "branchCount": 0, "codes": { "arduinoc": { "code": `DS3231_clock.setDate(/*{date}*/);\r\nDS3231_clock.setMonth(/*{mois}*/);\r\nDS3231_clock.setYear((/*{annee}*/>1000) ? /*{annee}*/ % 100 : /*{annee}*/);` } }, "handler": this.funcs.BLOCK_1656595410179 }, { "opcode": "BLOCK_1656595749942", "blockType": "number", "checkboxInFlyout": false, "gap": 12, "arguments": { "mode": { "type": "fieldMenu", "defaultValue": "0", "menu": "BLOCK_1656595749942_MODE" } }, "branchCount": 0, "codes": { "arduinoc": { "code": `DS3231_getTime(/*{mode}*/)`, "sections": { "declare": `int DS3231_getTime(int mode){\r\n bool b=false;\r\n switch (mode) {\r\n case 0:\r\n return int(DS3231_clock.getHour(b, b));\r\n break;\r\n case 1:\r\n return int(DS3231_clock.getMinute());\r\n break;\r\n case 2:\r\n return int(DS3231_clock.getSecond());\r\n break;\r\n case 3:\r\n return int(DS3231_clock.getDate());\r\n break;\r\n case 4:\r\n return int(DS3231_clock.getMonth(b));\r\n break;\r\n case 5:\r\n return int(DS3231_clock.getYear());\r\n break; \r\n }\r\n}` } } }, "handler": this.funcs.BLOCK_1656595749942 }, { "opcode": "BLOCK_1656596148335", "blockType": "string", "checkboxInFlyout": false, "gap": 12, "arguments": { "mode": { "type": "fieldMenu", "defaultValue": "0", "menu": "BLOCK_1656596148335_MODE" } }, "branchCount": 0, "codes": { "arduinoc": { "code": `DS3231_getSTime(/*{mode}*/)`, "sections": { "declare": `String strTimeFormat(byte value){\r\n String s;\r\n s=String(value, DEC);\r\n if (s.length()==1) s = \"0\"+s;\r\n return s;\r\n}\r\n\r\nString DS3231_getSTime(int mode){\r\n String s;\r\n bool b=false;\r\n if (mode==0){\r\n s = strTimeFormat(DS3231_clock.getHour(b, b));\r\n s += \":\";\r\n s += strTimeFormat(DS3231_clock.getMinute()); \r\n s += \":\";\r\n s += strTimeFormat(DS3231_clock.getSecond());\r\n }else if (mode==1){\r\n s = strTimeFormat(DS3231_clock.getDate()); \r\n s += \"/\";\r\n s += strTimeFormat(DS3231_clock.getMonth(b)); \r\n s += \"/\";\r\n s += strTimeFormat(DS3231_clock.getYear());\r\n }\r\n return s;\r\n}` } } }, "handler": this.funcs.BLOCK_1656596148335 }, { "opcode": "BLOCK_1656596600428", "blockType": "conditional", "checkboxInFlyout": false, "gap": 12, "arguments": { "alarm": { "type": "fieldMenu", "defaultValue": "1", "menu": "BLOCK_1656596600428_ALARM" }, "pinDigit": { "type": "fieldMenu", "defaultValue": "2", "menu": "BLOCK_1656596600428_PINDIGIT" }, "i": { "type": "number", "defaultValue": 1 }, "mode": { "type": "fieldMenu", "defaultValue": "0", "menu": "BLOCK_1656596600428_MODE" } }, "branchCount": 1, "codes": { "arduinoc": { "code": `DS3231_setAlarm(/*{alarm}*/,/*{mode}*/);`, "sections": { "declare": `void DS3231_setAlarm(int alarm, int mode){\r\n if(alarm==1){\r\n DS3231_clock.turnOffAlarm(1);\r\n switch (mode) {\r\n case 0: // quand les secondes valent x\r\n DS3231_clock.setA1Time(0, 0, 0, 0, 0b1110, false, false, false); \r\n break;\r\n case 1: // quand les minutes valent x\r\n DS3231_clock.setA1Time(0, 0, 0, 0, 0b1100, false, false, false); \r\n break;\r\n case 2: // quand les heures valent x\r\n DS3231_clock.setA1Time(0, 0, 0, 0, 0b1000, false, false, false); \r\n break;\r\n }\r\n DS3231_clock.turnOnAlarm(1);\r\n }else if(alarm==2){\r\n DS3231_clock.turnOffAlarm(2);\r\n switch (mode) {\r\n case 0: // quand les minutes valent 0\r\n DS3231_clock.setA2Time(0, 0, 0, 0b111, false, false, false); \r\n break;\r\n case 1: // quand les minutes valent x\r\n DS3231_clock.setA2Time(0, 0, 0, 0b110, false, false, false); \r\n break;\r\n case 2: // quand les heures valent x\r\n DS3231_clock.setA2Time(0, 0, 0, 0b100, false, false, false); \r\n break;\r\n }\r\n DS3231_clock.turnOnAlarm(2);\r\n }\r\n delay(100);\r\n}\r\n\r\nvoid DS3231_doWhenWakeUp(){\r\n if(digitalRead(/*{pinDigit}*/)==LOW){\r\n DS3231_clock.turnOffAlarm(/*{alarm}*/);\r\n DS3231_setAlarm(/*{alarm}*/,/*{mode}*/);\r\n DS3231_i ++;\r\n if(DS3231_i == /*{i}*/){\r\n\r\n /*{$BRANCH1}*/ \r\n \r\n DS3231_i=0;\r\n\r\n }\r\n }\r\n}\r`, "_loop": `DS3231_doWhenWakeUp();` } } }, "handler": this.funcs.BLOCK_1656596600428 }, { "opcode": "BLOCK_1656597084419", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": { "numero": { "type": "fieldMenu", "defaultValue": "1", "menu": "BLOCK_1656596600428_ALARM" }, "jour": { "type": "number", "defaultValue": 5 }, "heure": { "type": "number", "defaultValue": 20 }, "minute": { "type": "number", "defaultValue": 30 } }, "branchCount": 0, "handler": this.funcs.BLOCK_1656597084419 }], "menus": { "BLOCK_1656595749942_MODE": [{ "text": "BLOCK_1656595749942_MODE_0", "value": "0" }, { "text": "BLOCK_1656595749942_MODE_1", "value": "1" }, { "text": "BLOCK_1656595749942_MODE_2", "value": "2" }, { "text": "BLOCK_1656595749942_MODE_3", "value": "3" }, { "text": "BLOCK_1656595749942_MODE_4", "value": "4" }, { "text": "BLOCK_1656595749942_MODE_5", "value": "5" }], "BLOCK_1656596148335_MODE": [{ "text": "BLOCK_1656596148335_MODE_0", "value": "0" }, { "text": "BLOCK_1656596148335_MODE_1", "value": "1" }], "BLOCK_1656596600428_ALARM": [{ "text": "BLOCK_1656596600428_ALARM_0", "value": "1" }, { "text": "BLOCK_1656596600428_ALARM_1", "value": "2" }], "BLOCK_1656596600428_PINDIGIT": [{ "text": "BLOCK_1656596600428_PINDIGIT_0", "value": "2" }, { "text": "BLOCK_1656596600428_PINDIGIT_1", "value": "3" }, { "text": "BLOCK_1656596600428_PINDIGIT_2", "value": "4" }, { "text": "BLOCK_1656596600428_PINDIGIT_3", "value": "5" }, { "text": "BLOCK_1656596600428_PINDIGIT_4", "value": "6" }, { "text": "BLOCK_1656596600428_PINDIGIT_5", "value": "7" }, { "text": "BLOCK_1656596600428_PINDIGIT_6", "value": "8" }], "BLOCK_1656596600428_MODE": [{ "text": "BLOCK_1656596600428_MODE_0", "value": "0" }, { "text": "BLOCK_1656596600428_MODE_1", "value": "1" }, { "text": "BLOCK_1656596600428_MODE_2", "value": "2" }] } }, { "name": "cate_4b4990e1", "colors": ["#6739B6", "#5D33A4", "#522E92"], "menuIconURI": "", "blockIcon": { "type": "image", "width": 28, "height": 26, "src": window.MbApi.getExtResPath('vdr_df3231_lowpower/imgs/5400cbe10720481c814bced8ad030a0d.png', 'vdr_df3231_lowpower') }, "blocks": [{ "opcode": "BLOCK_1656663686735", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": { "pinDigit": { "type": "fieldMenu", "defaultValue": "2", "menu": "BLOCK_1656663686735_PINDIGIT" } }, "branchCount": 0, "codes": { "arduinoc": { "code": `LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);`, "sections": { "include": ["\"src/LowPower.h\""] } } }, "handler": this.funcs.BLOCK_1656663686735 }, { "opcode": "BLOCK_1656663686984", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": {}, "branchCount": 0, "codes": { "arduinoc": { "code": `LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);\r\n//Serial.println(\"reveil\");\r\n//delay(100);`, "sections": { "include": ["\"src/LowPower.h\""] } } }, "handler": this.funcs.BLOCK_1656663686984 }, { "opcode": "BLOCK_1656663687195", "blockType": "number", "checkboxInFlyout": false, "gap": 12, "arguments": {}, "branchCount": 0, "codes": { "arduinoc": { "code": `(float((analogRead(analogInPin))*5)/1023*2)`, "sections": { "declare": `const int analogInPin = A0;` } } }, "handler": this.funcs.BLOCK_1656663687195 }], "menus": { "BLOCK_1656663686735_PINDIGIT": [{ "text": "BLOCK_1656663686735_PINDIGIT_0", "value": "2" }, { "text": "BLOCK_1656663686735_PINDIGIT_1", "value": "3" }] } }], "generators": extGenerators, "translationMap": extTranslationMap, "snippets": codeSnippets, "generatorStartBlocks": [], "feature": ["worker"], "mustLoginBlocks": [], "disabledOffline": [], "disabledOnline": [] }; } getHandler() { if (typeof ExtHandler === 'object') { return ExtHandler; } else if (typeof ExtHandler === 'function') { return new ExtHandler(); } } } var _default = ExtVdrDf3231Lowpower; _exports.default = _default; });PK }'VY5m5m5handlerProxy.js"use strict";function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}var gen=fn.apply(self,args);_next(void 0)})}}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}self.rpc.CONFIG.TIMEOUT=42e3,self.rpc.CONFIG.HEARTBEAT=4200;var __context={app:self.rpc.remote.app,getDevice:function(deviceId){return new Proxy({},{get:function get(target,name){return"id"==name?deviceId:function(){for(var runDevice=__context.app.runDevice,_len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return runDevice.apply(void 0,[deviceId,name].concat(args))}}})}};!function(global){"use strict";function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&_instanceof(outerFn.prototype,Generator)?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=makeInvokeMethod(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(prototype){["next","throw","return"].forEach(function(method){prototype[method]=function(arg){return this._invoke(method,arg)}})}function AsyncIterator(generator){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"===record.type)reject(record.arg);else{var result=record.arg,value=result.value;return value&&"object"===_typeof(value)&&hasOwn.call(value,"__await")?Promise.resolve(value.__await).then(function(value){invoke("next",value,resolve,reject)},function(err){invoke("throw",err,resolve,reject)}):Promise.resolve(value).then(function(unwrapped){result.value=unwrapped,resolve(result)},function(error){return invoke("throw",error,resolve,reject)})}}function enqueue(method,arg){function callInvokeWithMethodAndArg(){return new Promise(function(resolve,reject){invoke(method,arg,resolve,reject)})}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}var previousPromise;this._invoke=enqueue}function makeInvokeMethod(innerFn,self,context){var state="suspendedStart";return function(method,arg){if(state==="executing")throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;if(!info)return context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel;if(info.done)context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0);else return info;return context.delegate=null,ContinueSentinel}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === "root") { return handle("end") } if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"); var hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true) } else if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc) } } else if (hasCatch) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true) } } else if (hasFinally) { if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc) } } else { throw new Error("try statement without catch or finally") } } } }, abrupt: function(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break } } if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { finallyEntry = null } var record = finallyEntry ? finallyEntry.completion : {}; record.type = type; record.arg = arg; if (finallyEntry) { this.method = "next"; this.next = finallyEntry.finallyLoc; return ContinueSentinel } return this.complete(record) }, complete: function(record, afterLoc) { if (record.type === "throw") { throw record.arg } if (record.type === "break" || record.type === "continue") { this.next = record.arg } else if (record.type === "return") { this.rval = this.arg = record.arg; this.method = "return"; this.next = "end" } else if (record.type === "normal" && afterLoc) { this.next = afterLoc } return ContinueSentinel }, finish: function(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) { this.complete(entry.completion, entry.afterLoc); resetTryEntry(entry); return ContinueSentinel } } }, "catch": function(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === "throw") { var thrown = record.arg; resetTryEntry(entry) } return thrown } } throw new Error("illegal catch attempt") }, delegateYield: function(iterable, resultName, nextLoc) { this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }; if (this.method === "next") { this.arg = undefined } return ContinueSentinel } } }(function() { return this || typeof self === "object" && self }() || Function("return this")()); // enter your javascript code here const disableBlocks = { debug: [], upload: [] }; const mustLoginBlocks = []; const triggerBlocksStatus = async (mode, app) => {} class ExtVdrDf3231Lowpower { constructor() { this.funcs = { 'BLOCK_1656602282019': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656602282019', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } }, 'BLOCK_1656594936925': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656594936925', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } }, 'BLOCK_1656595410179': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656595410179', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } }, 'BLOCK_1656595749942': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656595749942', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } }, 'BLOCK_1656596148335': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656596148335', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } }, 'BLOCK_1656596600428': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656596600428', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } }, 'BLOCK_1656597084419': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656597084419', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } }, 'BLOCK_1656663686735': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656663686735', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } }, 'BLOCK_1656663686984': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656663686984', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } }, 'BLOCK_1656663687195': { onRun: (args, app, device, block) => { return this.worker.remote.runBlock( 'BLOCK_1656663687195', 'onRun', device.id, { id: block.id, opcode: block.opcode, arguments: block.arguments }, Object.assign({}, args) ); } } }; } getInfo() { return { "id": "vdr_df3231_lowpower", "targets": [{ "name": "arduino_mega2560", "options": { "upload": { "middlewares": [{ "name": "arduino", "params": { "sources": extSources.arduino } }] } } }, { "name": "arduino_uno", "options": { "upload": { "middlewares": [{ "name": "arduino", "params": { "sources": extSources.arduino } }] } } } ], "codeTypes": [ "arduinoc" ], "version": "1.0.0", "platform": [ "mblockpc" ], "categories": cates(facepanels), "generators": extGenerators, "translationMap": extTranslationMap, "snippets": codeSnippets, "generatorStartBlocks": [], "feature": [ "worker" ], "mustLoginBlocks": [], "disabledOffline": [], "disabledOnline": [] }; } getHandler() { if (typeof extHandler === 'object') { return extHandler; } else if (typeof extHandler === 'function') { return new extHandler(); } } } export default ExtVdrDf3231Lowpower;PK }'V"v&&src/snippets.jsexport default [ "arduinoc: {}" ];PK }'VI~src/generators.jsexport default [({ lang: 'arduinoc', template: `// generated by mBlock5 for // codes make you happy //( include //) #include //( lib //) //({ this.$ALL_VARIABLES.length==0?'':this.$ALL_VARIABLES.map(v=>"float "+v+" = 0;").join('\\n') }//) //( declare //) void _delay(float seconds) { long endTime = millis() + seconds * 1000; while(millis() < endTime) _loop(); } //( void setup() { //( setup //) //( code //) } //) void _loop() { //( _loop //) } void loop() { _loop(); }`, splitor: { frame: { left: "//(", right: "//)", }, expression: { left: "/*{", right: "}*/", } }, reducers: [{ name: 'include', reduce: (codes) => { let codes1 = [] for (let code of codes) { let codeStr = ''; if (typeof code === 'string') { codeStr = code; } else if (typeof code === 'function') { codeStr = code(); } if (codes1.indexOf(codeStr) === -1) { codes1.push(codeStr); } } if (codes1.length === 0) { return undefined; } return codes1.map(code => { return '#include ' + code; }).join('\n') + '\n' } }] })];PK }'V^CCsrc/arduinosources.jsexport default [ "{ filename: \"src/DS3231.cpp\", code: \"/*\\nDS3231.cpp: DS3231 Real-Time Clock library\\nEric Ayars\\n4/1/11\\n\\nSpliced in DateTime all-at-once reading (to avoid rollover) and unix time\\nfrom Jean-Claude Wippler and Limor Fried\\nAndy Wickert\\n5/15/11\\n\\nFixed problem with SD processors(no function call) by replacing all occurences of the term PM, which\\nis defined as a macro on SAMD controllers by PM_time. \\nSimon Gassner\\n11/28/2017\\n\\nFixed setting 12-hour clock in setHour function so that 12:xx AM is not stored as 00:xx and corrected \\nthe setting of the PM flag for 12:xx PM. These address certain DS3231 errors in properly setting the \\nAM/PM (bit 5) flag in the 02h register when passing from AM to PM and PM to AM.\\nDavid Merrifield\\n04/14/2020\\n\\nReleased into the public domain.\\n*/\\n\\n#include \\\"DS3231.h\\\"\\n\\n// These included for the DateTime class inclusion; will try to find a way to\\n// not need them in the future...\\n#if defined(__AVR__)\\n#include \\n#elif defined(ESP8266)\\n#include \\n#endif\\n// Changed the following to work on 1.0\\n//#include \\\"WProgram.h\\\"\\n#include \\n\\n\\n#define CLOCK_ADDRESS 0x68\\n\\n#define SECONDS_FROM_1970_TO_2000 946684800\\n\\n\\n// Constructor\\nDS3231::DS3231() : _Wire(Wire) {\\n\\t// nothing to do for this constructor.\\n}\\n\\nDS3231::DS3231(TwoWire & w) : _Wire(w) {\\n}\\n\\n// Utilities from JeeLabs/Ladyada\\n\\n////////////////////////////////////////////////////////////////////////////////\\n// utility code, some of this could be exposed in the DateTime API if needed\\n\\n// DS3231 is smart enough to know this, but keeping it for now so I don't have\\n// to rewrite their code. -ADW\\nstatic const uint8_t daysInMonth [] PROGMEM = { 31,28,31,30,31,30,31,31,30,31,30,31 };\\n\\n// number of days since 2000/01/01, valid for 2001..2099\\nstatic uint16_t date2days(uint16_t y, uint8_t m, uint8_t d) {\\n if (y >= 2000)\\n y -= 2000;\\n uint16_t days = d;\\n for (uint8_t i = 1; i < m; ++i)\\n days += pgm_read_byte(daysInMonth + i - 1);\\n if (m > 2 && isleapYear(y))\\n ++days;\\n return days + 365 * y + (y + 3) / 4 - 1;\\n}\\n\\nstatic long time2long(uint16_t days, uint8_t h, uint8_t m, uint8_t s) {\\n return ((days * 24L + h) * 60 + m) * 60 + s;\\n}\\n\\n/***************************************** \\n\\tPublic Functions\\n *****************************************/\\n\\n/*******************************************************************************\\n * TO GET ALL DATE/TIME INFORMATION AT ONCE AND AVOID THE CHANCE OF ROLLOVER\\n * DateTime implementation spliced in here from Jean-Claude Wippler's (JeeLabs)\\n * RTClib, as modified by Limor Fried (Ladyada); source code at:\\n * https://github.com/adafruit/RTClib\\n ******************************************************************************/\\n\\n////////////////////////////////////////////////////////////////////////////////\\n// DateTime implementation - ignores time zones and DST changes\\n// NOTE: also ignores leap seconds, see http://en.wikipedia.org/wiki/Leap_second\\n\\nDateTime::DateTime (uint32_t t) {\\n t -= SECONDS_FROM_1970_TO_2000; // bring to 2000 timestamp from 1970\\n\\n ss = t % 60;\\n t /= 60;\\n mm = t % 60;\\n t /= 60;\\n hh = t % 24;\\n uint16_t days = t / 24;\\n uint8_t leap;\\n for (yOff = 0; ; ++yOff) {\\n leap = isleapYear(yOff);\\n if (days < 365 + leap)\\n break;\\n days -= 365 + leap;\\n }\\n for (m = 1; ; ++m) {\\n uint8_t daysPerMonth = pgm_read_byte(daysInMonth + m - 1);\\n if (leap && m == 2)\\n ++daysPerMonth;\\n if (days < daysPerMonth)\\n break;\\n days -= daysPerMonth;\\n }\\n d = days + 1;\\n}\\n\\nDateTime::DateTime (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec) {\\n if (year >= 2000)\\n year -= 2000;\\n yOff = year;\\n m = month;\\n d = day;\\n hh = hour;\\n mm = min;\\n ss = sec;\\n}\\n\\n// supported formats are date \\\"Mmm dd yyyy\\\" and time \\\"hh:mm:ss\\\" (same as __DATE__ and __TIME__)\\nDateTime::DateTime(const char* date, const char* time) {\\n static const char month_names[] = \\\"JanFebMarAprMayJunJulAugSepOctNovDec\\\";\\n static char buff[4] = {'0','0','0','0'};\\n int y;\\n sscanf(date, \\\"%s %c %d\\\", buff, &d, &y);\\n yOff = y >= 2000 ? y - 2000 : y;\\n m = (strstr(month_names, buff) - month_names) / 3 + 1;\\n sscanf(time, \\\"%c:%c:%c\\\", &hh, &mm, &ss);\\n}\\n\\n// UNIX time: IS CORRECT ONLY WHEN SET TO UTC!!!\\nuint32_t DateTime::unixtime(void) const {\\n uint32_t t;\\n uint16_t days = date2days(yOff, m, d);\\n t = time2long(days, hh, mm, ss);\\n t += SECONDS_FROM_1970_TO_2000; // seconds from 1970 to 2000\\n\\n return t;\\n}\\n\\n// Slightly modified from JeeLabs / Ladyada\\n// Get all date/time at once to avoid rollover (e.g., minute/second don't match)\\nstatic uint8_t bcd2bin (uint8_t val) { return val - 6 * (val >> 4); }\\n// Commented to avoid compiler warnings, but keeping in case we want this\\n// eventually\\n//static uint8_t bin2bcd (uint8_t val) { return val + 6 * (val / 10); }\\n\\nbool isleapYear(const uint8_t y) {\\n if(y&3)//check if divisible by 4\\n return false;\\n //only check other, when first failed\\n return (y % 100 || y % 400 == 0);\\n}\\n\\nDateTime RTClib::now(TwoWire & _Wire) {\\n _Wire.beginTransmission(CLOCK_ADDRESS);\\n _Wire.write(0);\\t// This is the first register address (Seconds)\\n \\t\\t\\t// We'll read from here on for 7 bytes: secs reg, minutes reg, hours, days, months and years.\\n _Wire.endTransmission();\\n \\n _Wire.requestFrom(CLOCK_ADDRESS, 7);\\n uint16_t ss = bcd2bin(_Wire.read() & 0x7F);\\n uint16_t mm = bcd2bin(_Wire.read());\\n uint16_t hh = bcd2bin(_Wire.read());\\n _Wire.read();\\n uint16_t d = bcd2bin(_Wire.read());\\n uint16_t m = bcd2bin(_Wire.read());\\n uint16_t y = bcd2bin(_Wire.read()) + 2000;\\n \\n return DateTime (y, m, d, hh, mm, ss);\\n}\\n\\n///// ERIC'S ORIGINAL CODE FOLLOWS /////\\n\\nbyte DS3231::getSecond() {\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x00);\\n\\t_Wire.endTransmission();\\n\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\treturn bcdToDec(_Wire.read());\\n}\\n\\nbyte DS3231::getMinute() {\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x01);\\n\\t_Wire.endTransmission();\\n\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\treturn bcdToDec(_Wire.read());\\n}\\n\\nbyte DS3231::getHour(bool& h12, bool& PM_time) {\\n\\tbyte temp_buffer;\\n\\tbyte hour;\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x02);\\n\\t_Wire.endTransmission();\\n\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\ttemp_buffer = _Wire.read();\\n\\th12 = temp_buffer & 0b01000000;\\n\\tif (h12) {\\n\\t\\tPM_time = temp_buffer & 0b00100000;\\n\\t\\thour = bcdToDec(temp_buffer & 0b00011111);\\n\\t} else {\\n\\t\\thour = bcdToDec(temp_buffer & 0b00111111);\\n\\t}\\n\\treturn hour;\\n}\\n\\nbyte DS3231::getDoW() {\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x03);\\n\\t_Wire.endTransmission();\\n\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\treturn bcdToDec(_Wire.read());\\n}\\n\\nbyte DS3231::getDate() {\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x04);\\n\\t_Wire.endTransmission();\\n\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\treturn bcdToDec(_Wire.read());\\n}\\n\\nbyte DS3231::getMonth(bool& Century) {\\n\\tbyte temp_buffer;\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x05);\\n\\t_Wire.endTransmission();\\n\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\ttemp_buffer = _Wire.read();\\n\\tCentury = temp_buffer & 0b10000000;\\n\\treturn (bcdToDec(temp_buffer & 0b01111111)) ;\\n}\\n\\nbyte DS3231::getYear() {\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x06);\\n\\t_Wire.endTransmission();\\n\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\treturn bcdToDec(_Wire.read());\\n}\\n\\n// setEpoch function gives the epoch as parameter and feeds the RTC\\n// epoch = UnixTime and starts at 01.01.1970 00:00:00\\nvoid DS3231::setEpoch(time_t epoch, bool flag_localtime) {\\n\\tstruct tm tmnow;\\n\\tif (flag_localtime) {\\n\\t\\tlocaltime_r(&epoch, &tmnow);\\n\\t}\\n\\telse {\\n\\t\\tgmtime_r(&epoch, &tmnow);\\n\\t}\\n\\tsetSecond(tmnow.tm_sec);\\n\\tsetMinute(tmnow.tm_min);\\n\\tsetHour(tmnow.tm_hour);\\n\\tsetDoW(tmnow.tm_wday + 1);\\n\\tsetDate(tmnow.tm_mday);\\n\\tsetMonth(tmnow.tm_mon + 1);\\n\\tsetYear(tmnow.tm_year - 100);\\n}\\n\\nvoid DS3231::setSecond(byte Second) {\\n\\t// Sets the seconds \\n\\t// This function also resets the Oscillator Stop Flag, which is set\\n\\t// whenever power is interrupted.\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x00);\\n\\t_Wire.write(decToBcd(Second));\\t\\n\\t_Wire.endTransmission();\\n\\t// Clear OSF flag\\n\\tbyte temp_buffer = readControlByte(1);\\n\\twriteControlByte((temp_buffer & 0b01111111), 1);\\n}\\n\\nvoid DS3231::setMinute(byte Minute) {\\n\\t// Sets the minutes \\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x01);\\n\\t_Wire.write(decToBcd(Minute));\\t\\n\\t_Wire.endTransmission();\\n}\\n\\n// Following setHour revision by David Merrifield 4/14/2020 correcting handling of 12-hour clock\\n\\nvoid DS3231::setHour(byte Hour) {\\n\\t// Sets the hour, without changing 12/24h mode.\\n\\t// The hour must be in 24h format.\\n\\n\\tbool h12;\\n\\tbyte temp_hour;\\n\\n\\t// Start by figuring out what the 12/24 mode is\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x02);\\n\\t_Wire.endTransmission();\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\th12 = (_Wire.read() & 0b01000000);\\n\\t// if h12 is true, it's 12h mode; false is 24h.\\n\\n\\tif (h12) {\\n\\t\\t// 12 hour\\n\\t\\tbool am_pm = (Hour > 11);\\n\\t\\ttemp_hour = Hour;\\n\\t\\tif (temp_hour > 11) {\\n\\t\\t\\ttemp_hour = temp_hour - 12;\\n\\t\\t}\\n\\t\\tif (temp_hour == 0) {\\n\\t\\t\\ttemp_hour = 12;\\n\\t\\t}\\n\\t\\ttemp_hour = decToBcd(temp_hour) | (am_pm << 5) | 0b01000000;\\n\\t} else {\\n\\t\\t// 24 hour\\n\\t\\ttemp_hour = decToBcd(Hour) & 0b10111111;\\n\\t}\\n\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x02);\\n\\t_Wire.write(temp_hour);\\n\\t_Wire.endTransmission();\\n}\\n\\nvoid DS3231::setDoW(byte DoW) {\\n\\t// Sets the Day of Week\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x03);\\n\\t_Wire.write(decToBcd(DoW));\\t\\n\\t_Wire.endTransmission();\\n}\\n\\nvoid DS3231::setDate(byte Date) {\\n\\t// Sets the Date\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x04);\\n\\t_Wire.write(decToBcd(Date));\\t\\n\\t_Wire.endTransmission();\\n}\\n\\nvoid DS3231::setMonth(byte Month) {\\n\\t// Sets the month\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x05);\\n\\t_Wire.write(decToBcd(Month));\\t\\n\\t_Wire.endTransmission();\\n}\\n\\nvoid DS3231::setYear(byte Year) {\\n\\t// Sets the year\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x06);\\n\\t_Wire.write(decToBcd(Year));\\t\\n\\t_Wire.endTransmission();\\n}\\n\\nvoid DS3231::setClockMode(bool h12) {\\n\\t// sets the mode to 12-hour (true) or 24-hour (false).\\n\\t// One thing that bothers me about how I've written this is that\\n\\t// if the read and right happen at the right hourly millisecnd,\\n\\t// the clock will be set back an hour. Not sure how to do it better, \\n\\t// though, and as long as one doesn't set the mode frequently it's\\n\\t// a very minimal risk. \\n\\t// It's zero risk if you call this BEFORE setting the hour, since\\n\\t// the setHour() function doesn't change this mode.\\n\\t\\n\\tbyte temp_buffer;\\n\\n\\t// Start by reading byte 0x02.\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x02);\\n\\t_Wire.endTransmission();\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\ttemp_buffer = _Wire.read();\\n\\n\\t// Set the flag to the requested value:\\n\\tif (h12) {\\n\\t\\ttemp_buffer = temp_buffer | 0b01000000;\\n\\t} else {\\n\\t\\ttemp_buffer = temp_buffer & 0b10111111;\\n\\t}\\n\\n\\t// Write the byte\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x02);\\n\\t_Wire.write(temp_buffer);\\n\\t_Wire.endTransmission();\\n}\\n\\nfloat DS3231::getTemperature() {\\n\\t// Checks the internal thermometer on the DS3231 and returns the \\n\\t// temperature as a floating-point value.\\n\\n // Updated / modified a tiny bit from \\\"Coding Badly\\\" and \\\"Tri-Again\\\"\\n // http://forum.arduino.cc/index.php/topic,22301.0.html\\n \\n byte tMSB, tLSB;\\n float temp3231;\\n \\n // temp registers (11h-12h) get updated automatically every 64s\\n _Wire.beginTransmission(CLOCK_ADDRESS);\\n _Wire.write(0x11);\\n _Wire.endTransmission();\\n _Wire.requestFrom(CLOCK_ADDRESS, 2);\\n\\n // Should I do more \\\"if available\\\" checks here?\\n if(_Wire.available()) {\\n tMSB = _Wire.read(); //2's complement int portion\\n tLSB = _Wire.read(); //fraction portion\\n\\n int16_t itemp = ( tMSB << 8 | (tLSB & 0xC0) ); // Shift upper byte, add lower\\n temp3231 = ( (float)itemp / 256.0 ); // Scale and return\\n }\\n else {\\n temp3231 = -9999; // Impossible temperature; error value\\n }\\n \\n return temp3231;\\n}\\n\\nvoid DS3231::getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM) {\\n\\tbyte temp_buffer;\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x07);\\n\\t_Wire.endTransmission();\\n\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 4);\\n\\n\\ttemp_buffer\\t= _Wire.read();\\t// Get A1M1 and A1 Seconds\\n\\tA1Second\\t= bcdToDec(temp_buffer & 0b01111111);\\n\\t// put A1M1 bit in position 0 of DS3231_AlarmBits.\\n\\tAlarmBits\\t= AlarmBits | (temp_buffer & 0b10000000)>>7;\\n\\n\\ttemp_buffer\\t\\t= _Wire.read();\\t// Get A1M2 and A1 minutes\\n\\tA1Minute\\t= bcdToDec(temp_buffer & 0b01111111);\\n\\t// put A1M2 bit in position 1 of DS3231_AlarmBits.\\n\\tAlarmBits\\t= AlarmBits | (temp_buffer & 0b10000000)>>6;\\n\\n\\ttemp_buffer\\t= _Wire.read();\\t// Get A1M3 and A1 Hour\\n\\t// put A1M3 bit in position 2 of DS3231_AlarmBits.\\n\\tAlarmBits\\t= AlarmBits | (temp_buffer & 0b10000000)>>5;\\n\\t// determine A1 12/24 mode\\n\\tA1h12\\t\\t= temp_buffer & 0b01000000;\\n\\tif (A1h12) {\\n\\t\\tA1PM\\t= temp_buffer & 0b00100000;\\t\\t\\t// determine am/pm\\n\\t\\tA1Hour\\t= bcdToDec(temp_buffer & 0b00011111);\\t// 12-hour\\n\\t} else {\\n\\t\\tA1Hour\\t= bcdToDec(temp_buffer & 0b00111111);\\t// 24-hour\\n\\t}\\n\\n\\ttemp_buffer\\t= _Wire.read();\\t// Get A1M4 and A1 Day/Date\\n\\t// put A1M3 bit in position 3 of DS3231_AlarmBits.\\n\\tAlarmBits\\t= AlarmBits | (temp_buffer & 0b10000000)>>4;\\n\\t// determine A1 day or date flag\\n\\tA1Dy\\t\\t= (temp_buffer & 0b01000000)>>6;\\n\\tif (A1Dy) {\\n\\t\\t// alarm is by day of week, not date.\\n\\t\\tA1Day\\t= bcdToDec(temp_buffer & 0b00001111);\\n\\t} else {\\n\\t\\t// alarm is by date, not day of week.\\n\\t\\tA1Day\\t= bcdToDec(temp_buffer & 0b00111111);\\n\\t}\\n}\\n\\nvoid DS3231::getA2Time(byte& A2Day, byte& A2Hour, byte& A2Minute, byte& AlarmBits, bool& A2Dy, bool& A2h12, bool& A2PM) {\\n\\tbyte temp_buffer;\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x0b);\\n\\t_Wire.endTransmission();\\n\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 3); \\n\\ttemp_buffer\\t= _Wire.read();\\t// Get A2M2 and A2 Minutes\\n\\tA2Minute\\t= bcdToDec(temp_buffer & 0b01111111);\\n\\t// put A2M2 bit in position 4 of DS3231_AlarmBits.\\n\\tAlarmBits\\t= AlarmBits | (temp_buffer & 0b10000000)>>3;\\n\\n\\ttemp_buffer\\t= _Wire.read();\\t// Get A2M3 and A2 Hour\\n\\t// put A2M3 bit in position 5 of DS3231_AlarmBits.\\n\\tAlarmBits\\t= AlarmBits | (temp_buffer & 0b10000000)>>2;\\n\\t// determine A2 12/24 mode\\n\\tA2h12\\t\\t= temp_buffer & 0b01000000;\\n\\tif (A2h12) {\\n\\t\\tA2PM\\t= temp_buffer & 0b00100000;\\t\\t\\t// determine am/pm\\n\\t\\tA2Hour\\t= bcdToDec(temp_buffer & 0b00011111);\\t// 12-hour\\n\\t} else {\\n\\t\\tA2Hour\\t= bcdToDec(temp_buffer & 0b00111111);\\t// 24-hour\\n\\t}\\n\\n\\ttemp_buffer\\t= _Wire.read();\\t// Get A2M4 and A1 Day/Date\\n\\t// put A2M4 bit in position 6 of DS3231_AlarmBits.\\n\\tAlarmBits\\t= AlarmBits | (temp_buffer & 0b10000000)>>1;\\n\\t// determine A2 day or date flag\\n\\tA2Dy\\t\\t= (temp_buffer & 0b01000000)>>6;\\n\\tif (A2Dy) {\\n\\t\\t// alarm is by day of week, not date.\\n\\t\\tA2Day\\t= bcdToDec(temp_buffer & 0b00001111);\\n\\t} else {\\n\\t\\t// alarm is by date, not day of week.\\n\\t\\tA2Day\\t= bcdToDec(temp_buffer & 0b00111111);\\n\\t}\\n}\\n\\nvoid DS3231::setA1Time(byte A1Day, byte A1Hour, byte A1Minute, byte A1Second, byte AlarmBits, bool A1Dy, bool A1h12, bool A1PM) {\\n\\t//\\tSets the alarm-1 date and time on the DS3231, using A1* information\\n\\tbyte temp_buffer;\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x07);\\t// A1 starts at 07h\\n\\t// Send A1 second and A1M1\\n\\t_Wire.write(decToBcd(A1Second) | ((AlarmBits & 0b00000001) << 7));\\n\\t// Send A1 Minute and A1M2\\n\\t_Wire.write(decToBcd(A1Minute) | ((AlarmBits & 0b00000010) << 6));\\n\\t// Figure out A1 hour \\n\\tif (A1h12) {\\n\\t\\t// Start by converting existing time to h12 if it was given in 24h.\\n\\t\\tif (A1Hour > 12) {\\n\\t\\t\\t// well, then, this obviously isn't a h12 time, is it?\\n\\t\\t\\tA1Hour = A1Hour - 12;\\n\\t\\t\\tA1PM = true;\\n\\t\\t}\\n\\t\\tif (A1PM) {\\n\\t\\t\\t// Afternoon\\n\\t\\t\\t// Convert the hour to BCD and add appropriate flags.\\n\\t\\t\\ttemp_buffer = decToBcd(A1Hour) | 0b01100000;\\n\\t\\t} else {\\n\\t\\t\\t// Morning\\n\\t\\t\\t// Convert the hour to BCD and add appropriate flags.\\n\\t\\t\\ttemp_buffer = decToBcd(A1Hour) | 0b01000000;\\n\\t\\t}\\n\\t} else {\\n\\t\\t// Now for 24h\\n\\t\\ttemp_buffer = decToBcd(A1Hour); \\n\\t}\\n\\ttemp_buffer = temp_buffer | ((AlarmBits & 0b00000100)<<5);\\n\\t// A1 hour is figured out, send it\\n\\t_Wire.write(temp_buffer); \\n\\t// Figure out A1 day/date and A1M4\\n\\ttemp_buffer = ((AlarmBits & 0b00001000)<<4) | decToBcd(A1Day);\\n\\tif (A1Dy) {\\n\\t\\t// Set A1 Day/Date flag (Otherwise it's zero)\\n\\t\\ttemp_buffer = temp_buffer | 0b01000000;\\n\\t}\\n\\t_Wire.write(temp_buffer);\\n\\t// All done!\\n\\t_Wire.endTransmission();\\n}\\n\\nvoid DS3231::setA2Time(byte A2Day, byte A2Hour, byte A2Minute, byte AlarmBits, bool A2Dy, bool A2h12, bool A2PM) {\\n\\t//\\tSets the alarm-2 date and time on the DS3231, using A2* information\\n\\tbyte temp_buffer;\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\t_Wire.write(0x0b);\\t// A1 starts at 0bh\\n\\t// Send A2 Minute and A2M2\\n\\t_Wire.write(decToBcd(A2Minute) | ((AlarmBits & 0b00010000) << 3));\\n\\t// Figure out A2 hour \\n\\tif (A2h12) {\\n\\t\\t// Start by converting existing time to h12 if it was given in 24h.\\n\\t\\tif (A2Hour > 12) {\\n\\t\\t\\t// well, then, this obviously isn't a h12 time, is it?\\n\\t\\t\\tA2Hour = A2Hour - 12;\\n\\t\\t\\tA2PM = true;\\n\\t\\t}\\n\\t\\tif (A2PM) {\\n\\t\\t\\t// Afternoon\\n\\t\\t\\t// Convert the hour to BCD and add appropriate flags.\\n\\t\\t\\ttemp_buffer = decToBcd(A2Hour) | 0b01100000;\\n\\t\\t} else {\\n\\t\\t\\t// Morning\\n\\t\\t\\t// Convert the hour to BCD and add appropriate flags.\\n\\t\\t\\ttemp_buffer = decToBcd(A2Hour) | 0b01000000;\\n\\t\\t}\\n\\t} else {\\n\\t\\t// Now for 24h\\n\\t\\ttemp_buffer = decToBcd(A2Hour); \\n\\t}\\n\\t// add in A2M3 bit\\n\\ttemp_buffer = temp_buffer | ((AlarmBits & 0b00100000)<<2);\\n\\t// A2 hour is figured out, send it\\n\\t_Wire.write(temp_buffer); \\n\\t// Figure out A2 day/date and A2M4\\n\\ttemp_buffer = ((AlarmBits & 0b01000000)<<1) | decToBcd(A2Day);\\n\\tif (A2Dy) {\\n\\t\\t// Set A2 Day/Date flag (Otherwise it's zero)\\n\\t\\ttemp_buffer = temp_buffer | 0b01000000;\\n\\t}\\n\\t_Wire.write(temp_buffer);\\n\\t// All done!\\n\\t_Wire.endTransmission();\\n}\\n\\nvoid DS3231::turnOnAlarm(byte Alarm) {\\n\\t// turns on alarm number \\\"Alarm\\\". Defaults to 2 if Alarm is not 1.\\n\\tbyte temp_buffer = readControlByte(0);\\n\\t// modify control byte\\n\\tif (Alarm == 1) {\\n\\t\\ttemp_buffer = temp_buffer | 0b00000101;\\n\\t} else {\\n\\t\\ttemp_buffer = temp_buffer | 0b00000110;\\n\\t}\\n\\twriteControlByte(temp_buffer, 0);\\n}\\n\\nvoid DS3231::turnOffAlarm(byte Alarm) {\\n\\t// turns off alarm number \\\"Alarm\\\". Defaults to 2 if Alarm is not 1.\\n\\t// Leaves interrupt pin alone.\\n\\tbyte temp_buffer = readControlByte(0);\\n\\t// modify control byte\\n\\tif (Alarm == 1) {\\n\\t\\ttemp_buffer = temp_buffer & 0b11111110;\\n\\t} else {\\n\\t\\ttemp_buffer = temp_buffer & 0b11111101;\\n\\t}\\n\\twriteControlByte(temp_buffer, 1);\\n}\\n\\nbool DS3231::checkAlarmEnabled(byte Alarm) {\\n\\t// Checks whether the given alarm is enabled.\\n\\tbyte result = 0x0;\\n\\tbyte temp_buffer = readControlByte(0);\\n\\tif (Alarm == 1) {\\n\\t\\tresult = temp_buffer & 0b00000001;\\n\\t} else {\\n\\t\\tresult = temp_buffer & 0b00000010;\\n\\t}\\n\\treturn result;\\n}\\n\\nbool DS3231::checkIfAlarm(byte Alarm) {\\n\\t// Checks whether alarm 1 or alarm 2 flag is on, returns T/F accordingly.\\n\\t// Turns flag off, also.\\n\\t// defaults to checking alarm 2, unless Alarm == 1.\\n\\tbyte result;\\n\\tbyte temp_buffer = readControlByte(1);\\n\\tif (Alarm == 1) {\\n\\t\\t// Did alarm 1 go off?\\n\\t\\tresult = temp_buffer & 0b00000001;\\n\\t\\t// clear flag\\n\\t\\ttemp_buffer = temp_buffer & 0b11111110;\\n\\t} else {\\n\\t\\t// Did alarm 2 go off?\\n\\t\\tresult = temp_buffer & 0b00000010;\\n\\t\\t// clear flag\\n\\t\\ttemp_buffer = temp_buffer & 0b11111101;\\n\\t}\\n\\twriteControlByte(temp_buffer, 1);\\n\\treturn result;\\n}\\n\\nvoid DS3231::enableOscillator(bool TF, bool battery, byte frequency) {\\n\\t// turns oscillator on or off. True is on, false is off.\\n\\t// if battery is true, turns on even for battery-only operation,\\n\\t// otherwise turns off if Vcc is off.\\n\\t// frequency must be 0, 1, 2, or 3.\\n\\t// 0 = 1 Hz\\n\\t// 1 = 1.024 kHz\\n\\t// 2 = 4.096 kHz\\n\\t// 3 = 8.192 kHz (Default if frequency byte is out of range)\\n\\tif (frequency > 3) frequency = 3;\\n\\t// read control byte in, but zero out current state of RS2 and RS1.\\n\\tbyte temp_buffer = readControlByte(0) & 0b11100111;\\n\\tif (battery) {\\n\\t\\t// turn on BBSQW flag\\n\\t\\ttemp_buffer = temp_buffer | 0b01000000;\\n\\t} else {\\n\\t\\t// turn off BBSQW flag\\n\\t\\ttemp_buffer = temp_buffer & 0b10111111;\\n\\t}\\n\\tif (TF) {\\n\\t\\t// set ~EOSC to 0 and INTCN to zero.\\n\\t\\ttemp_buffer = temp_buffer & 0b01111011;\\n\\t} else {\\n\\t\\t// set ~EOSC to 1, leave INTCN as is.\\n\\t\\ttemp_buffer = temp_buffer | 0b10000000;\\n\\t}\\n\\t// shift frequency into bits 3 and 4 and set.\\n\\tfrequency = frequency << 3;\\n\\ttemp_buffer = temp_buffer | frequency;\\n\\t// And write the control bits\\n\\twriteControlByte(temp_buffer, 0);\\n}\\n\\nvoid DS3231::enable32kHz(bool TF) {\\n\\t// turn 32kHz pin on or off\\n\\tbyte temp_buffer = readControlByte(1);\\n\\tif (TF) {\\n\\t\\t// turn on 32kHz pin\\n\\t\\ttemp_buffer = temp_buffer | 0b00001000;\\n\\t} else {\\n\\t\\t// turn off 32kHz pin\\n\\t\\ttemp_buffer = temp_buffer & 0b11110111;\\n\\t}\\n\\twriteControlByte(temp_buffer, 1);\\n}\\n\\nbool DS3231::oscillatorCheck() {\\n\\t// Returns false if the oscillator has been off for some reason.\\n\\t// If this is the case, the time is probably not correct.\\n\\tbyte temp_buffer = readControlByte(1);\\n\\tbool result = true;\\n\\tif (temp_buffer & 0b10000000) {\\n\\t\\t// Oscillator Stop Flag (OSF) is set, so return false.\\n\\t\\tresult = false;\\n\\t}\\n\\treturn result;\\n}\\n\\n/***************************************** \\n\\tPrivate Functions\\n *****************************************/\\n\\nbyte DS3231::decToBcd(byte val) {\\n// Convert normal decimal numbers to binary coded decimal\\n\\treturn ( (val/10*16) + (val%10) );\\n}\\n\\nbyte DS3231::bcdToDec(byte val) {\\n// Convert binary coded decimal to normal decimal numbers\\n\\treturn ( (val/16*10) + (val%16) );\\n}\\n\\nbyte DS3231::readControlByte(bool which) {\\n\\t// Read selected control byte\\n\\t// first byte (0) is 0x0e, second (1) is 0x0f\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\tif (which) {\\n\\t\\t// second control byte\\n\\t\\t_Wire.write(0x0f);\\n\\t} else {\\n\\t\\t// first control byte\\n\\t\\t_Wire.write(0x0e);\\n\\t}\\n\\t_Wire.endTransmission();\\n\\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\\n\\treturn _Wire.read();\\t\\n}\\n\\nvoid DS3231::writeControlByte(byte control, bool which) {\\n\\t// Write the selected control byte.\\n\\t// which=false -> 0x0e, true->0x0f.\\n\\t_Wire.beginTransmission(CLOCK_ADDRESS);\\n\\tif (which) {\\n\\t\\t_Wire.write(0x0f);\\n\\t} else {\\n\\t\\t_Wire.write(0x0e);\\n\\t}\\n\\t_Wire.write(control);\\n\\t_Wire.endTransmission();\\n}\\n\\n\" }", "{ filename: \"src/DS3231.h\", code: \"/*\\n * DS3231.h\\n *\\n * Arduino Library for the DS3231 Real-Time Clock chip\\n *\\n * (c) Eric Ayars\\n * 4/1/11\\n * released into the public domain. If you use this, please let me know\\n * (just out of pure curiosity!) by sending me an email:\\n * eric@ayars.org\\n *\\n */\\n\\n// Modified by Andy Wickert 5/15/11: Spliced in stuff from RTClib\\n// Modified by Simon Gassner 11/28/2017: Changed Term \\\"PM\\\" to \\\"PM_time\\\" for compability with SAMD Processors\\n#ifndef DS3231_h\\n#define DS3231_h\\n\\n// Changed the following to work on 1.0\\n//#include \\\"WProgram.h\\\"\\n#include \\n#include \\n#include \\n\\n// DateTime (get everything at once) from JeeLabs / Adafruit\\n// Simple general-purpose date/time class (no TZ / DST / leap second handling!)\\nclass DateTime {\\npublic:\\n DateTime (uint32_t t =0);\\n DateTime (uint16_t year, uint8_t month, uint8_t day,\\n uint8_t hour =0, uint8_t min =0, uint8_t sec =0);\\n DateTime (const char* date, const char* time);\\n uint16_t year() const { return 2000 + yOff; }\\n uint8_t month() const { return m; }\\n uint8_t day() const { return d; }\\n uint8_t hour() const { return hh; }\\n uint8_t minute() const { return mm; }\\n uint8_t second() const { return ss; }\\n uint8_t dayOfTheWeek() const;\\n\\n // 32-bit times as seconds since 1/1/2000\\n long secondstime() const;\\n // 32-bit times as seconds since 1/1/1970\\n // THE ABOVE COMMENT IS CORRECT FOR LOCAL TIME; TO USE THIS COMMAND TO\\n // OBTAIN TRUE UNIX TIME SINCE EPOCH, YOU MUST CALL THIS COMMAND AFTER\\n // SETTING YOUR CLOCK TO UTC\\n uint32_t unixtime(void) const;\\nprotected:\\n uint8_t yOff, m, d, hh, mm, ss;\\n};\\n\\n//checks if a year is a leap year\\nbool isleapYear(const uint8_t);\\n\\nclass RTClib {\\n public:\\n\\t\\t// Get date and time snapshot\\n static DateTime now(TwoWire & _Wire = Wire);\\n};\\n\\n// Eric's original code is everything below this line\\nclass DS3231 {\\n\\tpublic:\\n\\t\\t\\t\\n\\t\\t//Constructor\\n\\t\\tDS3231();\\n\\t\\tDS3231(TwoWire & w);\\n\\n\\t\\tTwoWire & _Wire;\\n\\n\\t\\t// Time-retrieval functions\\n \\n\\t\\t// the get*() functions retrieve current values of the registers.\\n\\t\\tbyte getSecond(); \\n\\t\\tbyte getMinute(); \\n\\t\\tbyte getHour(bool& h12, bool& PM_time); \\n\\t\\t\\t// In addition to returning the hour register, this function\\n\\t\\t\\t// returns the values of the 12/24-hour flag and the AM/PM flag.\\n\\t\\tbyte getDoW(); \\n\\t\\tbyte getDate(); \\n\\t\\tbyte getMonth(bool& Century); \\n\\t\\t\\t// Also sets the flag indicating century roll-over.\\n\\t\\tbyte getYear(); \\n\\t\\t\\t// Last 2 digits only\\n\\n\\t\\t// Time-setting functions\\n\\t\\t// Note that none of these check for sensibility: You can set the\\n\\t\\t// date to July 42nd and strange things will probably result.\\n\\t\\t\\n\\t\\t// set epoch function gives the epoch as parameter and feeds the RTC\\n\\t\\t// epoch = UnixTime and starts at 01.01.1970 00:00:00\\n\\t\\tvoid setEpoch(time_t epoch = 0, bool flag_localtime = false);\\n\\n\\t\\tvoid setSecond(byte Second); \\n\\t\\t\\t// In addition to setting the seconds, this clears the \\n\\t\\t\\t// \\\"Oscillator Stop Flag\\\".\\n\\t\\tvoid setMinute(byte Minute); \\n\\t\\t\\t// Sets the minute\\n\\t\\tvoid setHour(byte Hour); \\n\\t\\t\\t// Sets the hour\\n\\t\\tvoid setDoW(byte DoW); \\n\\t\\t\\t// Sets the Day of the Week (1-7);\\n\\t\\tvoid setDate(byte Date); \\n\\t\\t\\t// Sets the Date of the Month\\n\\t\\tvoid setMonth(byte Month); \\n\\t\\t\\t// Sets the Month of the year\\n\\t\\tvoid setYear(byte Year); \\n\\t\\t\\t// Last two digits of the year\\n\\t\\tvoid setClockMode(bool h12); \\n\\t\\t\\t// Set 12/24h mode. True is 12-h, false is 24-hour.\\n\\n\\t\\t// Temperature function\\n\\n\\t\\tfloat getTemperature(); \\n\\n\\t\\t// Alarm functions\\n\\t\\t\\n\\t\\tvoid getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM); \\n/* Retrieves everything you could want to know about alarm\\n * one. \\n * A1Dy true makes the alarm go on A1Day = Day of Week,\\n * A1Dy false makes the alarm go on A1Day = Date of month.\\n *\\n * byte AlarmBits sets the behavior of the alarms:\\n *\\tDy\\tA1M4\\tA1M3\\tA1M2\\tA1M1\\tRate\\n *\\tX\\t1\\t\\t1\\t\\t1\\t\\t1\\t\\tOnce per second\\n *\\tX\\t1\\t\\t1\\t\\t1\\t\\t0\\t\\tAlarm when seconds match\\n *\\tX\\t1\\t\\t1\\t\\t0\\t\\t0\\t\\tAlarm when min, sec match\\n *\\tX\\t1\\t\\t0\\t\\t0\\t\\t0\\t\\tAlarm when hour, min, sec match\\n *\\t0\\t0\\t\\t0\\t\\t0\\t\\t0\\t\\tAlarm when date, h, m, s match\\n *\\t1\\t0\\t\\t0\\t\\t0\\t\\t0\\t\\tAlarm when DoW, h, m, s match\\n *\\n *\\tDy\\tA2M4\\tA2M3\\tA2M2\\tRate\\n *\\tX\\t1\\t\\t1\\t\\t1\\t\\tOnce per minute (at seconds = 00)\\n *\\tX\\t1\\t\\t1\\t\\t0\\t\\tAlarm when minutes match\\n *\\tX\\t1\\t\\t0\\t\\t0\\t\\tAlarm when hours and minutes match\\n *\\t0\\t0\\t\\t0\\t\\t0\\t\\tAlarm when date, hour, min match\\n *\\t1\\t0\\t\\t0\\t\\t0\\t\\tAlarm when DoW, hour, min match\\n */\\n\\t\\tvoid getA2Time(byte& A2Day, byte& A2Hour, byte& A2Minute, byte& AlarmBits, bool& A2Dy, bool& A2h12, bool& A2PM); \\n\\t\\t\\t// Same as getA1Time();, but A2 only goes on seconds == 00.\\n\\t\\tvoid setA1Time(byte A1Day, byte A1Hour, byte A1Minute, byte A1Second, byte AlarmBits, bool A1Dy, bool A1h12, bool A1PM); \\n\\t\\t\\t// Set the details for Alarm 1\\n\\t\\tvoid setA2Time(byte A2Day, byte A2Hour, byte A2Minute, byte AlarmBits, bool A2Dy, bool A2h12, bool A2PM); \\n\\t\\t\\t// Set the details for Alarm 2\\n\\t\\tvoid turnOnAlarm(byte Alarm); \\n\\t\\t\\t// Enables alarm 1 or 2 and the external interrupt pin.\\n\\t\\t\\t// If Alarm != 1, it assumes Alarm == 2.\\n\\t\\tvoid turnOffAlarm(byte Alarm); \\n\\t\\t\\t// Disables alarm 1 or 2 (default is 2 if Alarm != 1);\\n\\t\\t\\t// and leaves the interrupt pin alone.\\n\\t\\tbool checkAlarmEnabled(byte Alarm); \\n\\t\\t\\t// Returns T/F to indicate whether the requested alarm is\\n\\t\\t\\t// enabled. Defaults to 2 if Alarm != 1.\\n\\t\\tbool checkIfAlarm(byte Alarm); \\n\\t\\t\\t// Checks whether the indicated alarm (1 or 2, 2 default);\\n\\t\\t\\t// has been activated.\\n\\n\\t\\t// Oscillator functions\\n\\n\\t\\tvoid enableOscillator(bool TF, bool battery, byte frequency); \\n\\t\\t\\t// turns oscillator on or off. True is on, false is off.\\n\\t\\t\\t// if battery is true, turns on even for battery-only operation,\\n\\t\\t\\t// otherwise turns off if Vcc is off.\\n\\t\\t\\t// frequency must be 0, 1, 2, or 3.\\n\\t\\t\\t// 0 = 1 Hz\\n\\t\\t\\t// 1 = 1.024 kHz\\n\\t\\t\\t// 2 = 4.096 kHz\\n\\t\\t\\t// 3 = 8.192 kHz (Default if frequency byte is out of range);\\n\\t\\tvoid enable32kHz(bool TF); \\n\\t\\t\\t// Turns the 32kHz output pin on (true); or off (false).\\n\\t\\tbool oscillatorCheck();;\\n\\t\\t\\t// Checks the status of the OSF (Oscillator Stop Flag);.\\n\\t\\t\\t// If this returns false, then the clock is probably not\\n\\t\\t\\t// giving you the correct time.\\n\\t\\t\\t// The OSF is cleared by function setSecond();.\\n\\n\\tprivate:\\n\\n\\t\\tbyte decToBcd(byte val); \\n\\t\\t\\t// Convert normal decimal numbers to binary coded decimal\\n\\t\\tbyte bcdToDec(byte val); \\n\\t\\t\\t// Convert binary coded decimal to normal decimal numbers\\n\\n\\tprotected:\\n\\n\\t\\tbyte readControlByte(bool which); \\n\\t\\t\\t// Read selected control byte: (0); reads 0x0e, (1) reads 0x0f\\n\\t\\tvoid writeControlByte(byte control, bool which); \\n\\t\\t\\t// Write the selected control byte. \\n\\t\\t\\t// which == false -> 0x0e, true->0x0f.\\n\\n};\\n\\n#endif\\n\" }", "{ filename: \"src/LowPower.cpp\", code: \"/*******************************************************************************\\n* LowPower Library\\n* Version: 1.81\\n* Date: 21-01-2020\\n* Author: Lim Phang Moh\\n* Company: Rocket Scream Electronics\\n* Website: www.rocketscream.com\\n*\\n* This is a lightweight low power library for Arduino.\\n*\\n* This library is licensed under Creative Commons Attribution-ShareAlike 3.0\\n* Unported License.\\n*\\n* Revision Description\\n* ======== ===========\\n* 1.81 Fixed timer 2 settings incorrectly restored after sleep.\\n* Contributed by rwared11.\\n* 1.80 Added support for ATmega88 and ATmega168P. PowerExtStandby()\\n* modified because not supported on Atmega88 / Atmega168\\n* Contributed by mrguen.\\n* 1.70 Added support for ATmega644P and ATmega1284P.\\n* Contributed by alexreinert.\\n* 1.60 Added support for ATmega256RFR2. Contributed by Rodmg.\\n* 1.50 Fixed compiler optimization (Arduino IDE 1.6.x branch) on BOD enable\\n* function that causes the function to be over optimized.\\n* 1.40\\t\\tAdded support for ATSAMD21G18A.\\n* \\t\\t\\tLibrary format compliant with Arduino IDE 1.5.x.\\n* 1.30\\t\\tAdded support for ATMega168, ATMega2560, ATMega1280 & ATMega32U4.\\n*\\t\\t\\tTested to work with Arduino IDE 1.0.1 - 1.0.4.\\n* 1.20\\t\\tRemove typo error in idle method for checking whether Timer 0 was\\n*\\t\\t\\tturned off.\\n*\\t\\t\\tRemove dependecy on WProgram.h which is not required.\\n*\\t\\t\\tTested to work with Arduino IDE 1.0.\\n* 1.10\\t\\tAdded #ifndef for sleep_bod_disable() for compatibility with future\\n*\\t\\t\\tArduino IDE release.\\n* 1.00 Initial public release.\\n*******************************************************************************/\\n#if defined (__AVR__)\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n#elif defined (__arm__)\\n\\n#else\\n\\t#error \\\"Processor architecture is not supported.\\\"\\n#endif\\n\\n#include \\\"LowPower.h\\\"\\n\\n#if defined (__AVR__)\\n// Only Pico Power devices can change BOD settings through software\\n#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__)\\n#ifndef sleep_bod_disable\\n#define sleep_bod_disable() \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\\\ndo { \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\\\n unsigned char tempreg; \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\\\n __asm__ __volatile__(\\\"in %[tempreg], %[mcucr]\\\" \\\"\\\\n\\\\t\\\" \\t\\t\\t\\\\\\n \\\"ori %[tempreg], %[bods_bodse]\\\" \\\"\\\\n\\\\t\\\" \\t\\t\\\\\\n \\\"out %[mcucr], %[tempreg]\\\" \\\"\\\\n\\\\t\\\" \\t\\t\\t\\\\\\n \\\"andi %[tempreg], %[not_bodse]\\\" \\\"\\\\n\\\\t\\\" \\t\\t\\\\\\n \\\"out %[mcucr], %[tempreg]\\\" \\t\\t\\t\\t\\t\\\\\\n : [tempreg] \\\"=&d\\\" (tempreg) \\t\\t\\t\\t\\t\\\\\\n : [mcucr] \\\"I\\\" _SFR_IO_ADDR(MCUCR), \\t\\t\\t\\\\\\n [bods_bodse] \\\"i\\\" (_BV(BODS) | _BV(BODSE)), \\\\\\n [not_bodse] \\\"i\\\" (~_BV(BODSE))); \\t\\t\\t\\\\\\n} while (0)\\n#endif\\n#endif\\n\\n#define\\tlowPowerBodOn(mode)\\t\\\\\\ndo { \\t\\t\\t\\t\\t\\t\\\\\\n set_sleep_mode(mode); \\\\\\n cli();\\t\\t\\t\\t\\\\\\n sleep_enable();\\t\\t\\\\\\n sei();\\t\\t\\t\\t\\\\\\n sleep_cpu();\\t\\t\\t\\\\\\n sleep_disable();\\t\\t\\\\\\n sei();\\t\\t\\t\\t\\\\\\n} while (0);\\n\\n// Only Pico Power devices can change BOD settings through software\\n#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\\n#define\\tlowPowerBodOff(mode)\\\\\\ndo { \\t\\t\\t\\t\\t\\t\\\\\\n set_sleep_mode(mode); \\\\\\n cli();\\t\\t\\t\\t\\\\\\n sleep_enable();\\t\\t\\\\\\n\\t\\t\\tsleep_bod_disable(); \\\\\\n sei();\\t\\t\\t\\t\\\\\\n sleep_cpu();\\t\\t\\t\\\\\\n sleep_disable();\\t\\t\\\\\\n sei();\\t\\t\\t\\t\\\\\\n} while (0);\\n#endif\\n\\n// Some macros is still missing from AVR GCC distribution for ATmega32U4\\n#if defined __AVR_ATmega32U4__\\n\\t// Timer 4 PRR bit is currently not defined in iom32u4.h\\n\\t#ifndef PRTIM4\\n\\t\\t#define PRTIM4 4\\n\\t#endif\\n\\n\\t// Timer 4 power reduction macro is not defined currently in power.h\\n\\t#ifndef power_timer4_disable\\n\\t\\t#define power_timer4_disable()\\t(PRR1 |= (uint8_t)(1 << PRTIM4))\\n\\t#endif\\n\\n\\t#ifndef power_timer4_enable\\n\\t\\t#define power_timer4_enable()\\t\\t(PRR1 &= (uint8_t)~(1 << PRTIM4))\\n\\t#endif\\n#endif\\n\\n/*******************************************************************************\\n* Name: idle\\n* Description: Putting ATmega328P/168 into idle state. Please make sure you\\n*\\t\\t\\t understand the implication and result of disabling module.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control:\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. timer2\\t\\tTimer 2 module disable control:\\n*\\t\\t\\t\\t(a) TIMER2_OFF - Turn off Timer 2 module\\n*\\t\\t\\t\\t(b) TIMER2_ON - Leave Timer 2 module in its default state\\n*\\n* 4. timer1\\t\\tTimer 1 module disable control:\\n*\\t\\t\\t\\t(a) TIMER1_OFF - Turn off Timer 1 module\\n*\\t\\t\\t\\t(b) TIMER1_ON - Leave Timer 1 module in its default state\\n*\\n* 5. timer0\\t\\tTimer 0 module disable control:\\n*\\t\\t\\t\\t(a) TIMER0_OFF - Turn off Timer 0 module\\n*\\t\\t\\t\\t(b) TIMER0_ON - Leave Timer 0 module in its default state\\n*\\n* 6. spi\\t\\tSPI module disable control:\\n*\\t\\t\\t\\t(a) SPI_OFF - Turn off SPI module\\n*\\t\\t\\t\\t(b) SPI_ON - Leave SPI module in its default state\\n*\\n* 7. usart0\\t\\tUSART0 module disable control:\\n*\\t\\t\\t\\t(a) USART0_OFF - Turn off USART0 module\\n*\\t\\t\\t\\t(b) USART0_ON - Leave USART0 module in its default state\\n*\\n* 8. twi\\t\\tTWI module disable control:\\n*\\t\\t\\t\\t(a) TWI_OFF - Turn off TWI module\\n*\\t\\t\\t\\t(b) TWI_ON - Leave TWI module in its default state\\n*\\n*******************************************************************************/\\n#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168__) || defined (__AVR_ATmega168P__) || defined (__AVR_ATmega88__)\\nvoid\\tLowPowerClass::idle(period_t period, adc_t adc, timer2_t timer2,\\n\\t\\t\\t\\t\\t\\t\\ttimer1_t timer1, timer0_t timer0,\\n\\t\\t\\t\\t\\t\\t\\tspi_t spi, usart0_t usart0,\\ttwi_t twi)\\n{\\n\\t// Temporary clock source variable\\n\\tunsigned char clockSource = 0;\\n\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n\\t\\t// Store current setting\\n clockSource = TCCR2B;\\n\\n\\t\\t// Remove the clock source to shutdown Timer2\\n\\t\\tTCCR2B &= ~(1 << CS22);\\n\\t\\tTCCR2B &= ~(1 << CS21);\\n\\t\\tTCCR2B &= ~(1 << CS20);\\n\\n\\t\\tpower_timer2_disable();\\n\\t}\\n\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tADCSRA &= ~(1 << ADEN);\\n\\t\\tpower_adc_disable();\\n\\t}\\n\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_disable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_disable();\\n\\tif (spi == SPI_OFF)\\t\\t\\tpower_spi_disable();\\n\\tif (usart0 == USART0_OFF)\\tpower_usart0_disable();\\n\\tif (twi == TWI_OFF)\\t\\t\\tpower_twi_disable();\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\n\\tlowPowerBodOn(SLEEP_MODE_IDLE);\\n\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tpower_adc_enable();\\n\\t\\tADCSRA |= (1 << ADEN);\\n\\t}\\n\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n // Restore previous setting\\n TCCR2B = clockSource;\\n \\n\\t\\tpower_timer2_enable();\\n\\t}\\n\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_enable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_enable();\\n\\tif (spi == SPI_OFF)\\t\\t\\tpower_spi_enable();\\n\\tif (usart0 == USART0_OFF)\\tpower_usart0_enable();\\n\\tif (twi == TWI_OFF)\\t\\t\\tpower_twi_enable();\\n}\\n#endif\\n\\n/*******************************************************************************\\n* Name: idle\\n* Description: Putting ATmega32U4 into idle state. Please make sure you\\n*\\t\\t\\t understand the implication and result of disabling module.\\n*\\t\\t\\t Take note that Timer 2 is not available and USART0 is replaced\\n* \\t\\t\\t with USART1 on ATmega32U4.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control:\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. timer4\\t\\tTimer 4 module disable control:\\n*\\t\\t\\t\\t(a) TIMER4_OFF - Turn off Timer 4 module\\n*\\t\\t\\t\\t(b) TIMER4_ON - Leave Timer 4 module in its default state\\n*\\n* 4. timer3\\t\\tTimer 3 module disable control:\\n*\\t\\t\\t\\t(a) TIMER3_OFF - Turn off Timer 3 module\\n*\\t\\t\\t\\t(b) TIMER3_ON - Leave Timer 3 module in its default state\\n*\\n* 5. timer1\\t\\tTimer 1 module disable control:\\n*\\t\\t\\t\\t(a) TIMER1_OFF - Turn off Timer 1 module\\n*\\t\\t\\t\\t(b) TIMER1_ON - Leave Timer 1 module in its default state\\n*\\n* 6. timer0\\t\\tTimer 0 module disable control:\\n*\\t\\t\\t\\t(a) TIMER0_OFF - Turn off Timer 0 module\\n*\\t\\t\\t\\t(b) TIMER0_ON - Leave Timer 0 module in its default state\\n*\\n* 7. spi\\t\\tSPI module disable control:\\n*\\t\\t\\t\\t(a) SPI_OFF - Turn off SPI module\\n*\\t\\t\\t\\t(b) SPI_ON - Leave SPI module in its default state\\n*\\n* 8. usart1\\t\\tUSART1 module disable control:\\n*\\t\\t\\t\\t(a) USART1_OFF - Turn off USART1 module\\n*\\t\\t\\t\\t(b) USART1_ON - Leave USART1 module in its default state\\n*\\n* 9. twi\\t\\tTWI module disable control:\\n*\\t\\t\\t\\t(a) TWI_OFF - Turn off TWI module\\n*\\t\\t\\t\\t(b) TWI_ON - Leave TWI module in its default state\\n*\\n* 10.usb\\t\\tUSB module disable control:\\n*\\t\\t\\t\\t(a) USB_OFF - Turn off USB module\\n*\\t\\t\\t\\t(b) USB_ON - Leave USB module in its default state\\n*******************************************************************************/\\n#if defined __AVR_ATmega32U4__\\nvoid\\tLowPowerClass::idle(period_t period, adc_t adc,\\n\\t\\t\\t\\t\\t\\t\\ttimer4_t timer4, timer3_t timer3,\\n\\t\\t\\t\\t\\t\\t\\ttimer1_t timer1, timer0_t timer0,\\n\\t\\t\\t\\t\\t\\t\\tspi_t spi, usart1_t usart1,\\ttwi_t twi, usb_t usb)\\n{\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tADCSRA &= ~(1 << ADEN);\\n\\t\\tpower_adc_disable();\\n\\t}\\n\\n\\tif (timer4 == TIMER4_OFF)\\tpower_timer4_disable();\\n\\tif (timer3 == TIMER3_OFF)\\tpower_timer3_disable();\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_disable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_disable();\\n\\tif (spi == SPI_OFF)\\t\\t\\tpower_spi_disable();\\n\\tif (usart1 == USART1_OFF)\\tpower_usart1_disable();\\n\\tif (twi == TWI_OFF)\\t\\t\\tpower_twi_disable();\\n\\tif (usb == USB_OFF)\\t\\t\\tpower_usb_disable();\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\n\\tlowPowerBodOn(SLEEP_MODE_IDLE);\\n\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tpower_adc_enable();\\n\\t\\tADCSRA |= (1 << ADEN);\\n\\t}\\n\\n\\tif (timer4 == TIMER4_OFF)\\tpower_timer4_enable();\\n\\tif (timer3 == TIMER3_OFF)\\tpower_timer3_enable();\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_enable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_enable();\\n\\tif (spi == SPI_OFF)\\t\\t\\tpower_spi_enable();\\n\\tif (usart1 == USART1_OFF)\\tpower_usart1_enable();\\n\\tif (twi == TWI_OFF)\\t\\t\\tpower_twi_enable();\\n\\tif (usb == USB_OFF)\\t\\t\\tpower_usb_enable();\\n}\\n#endif\\n\\n/*******************************************************************************\\n* Name: idle\\n* Description: Putting ATmega644P & ATmega1284P into idle state. Please make sure\\n*\\t\\t\\t you understand the implication and result of disabling module.\\n*\\t\\t\\t Take note that extra USART 1 compared to an ATmega328P/168.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control:\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. timer2\\t\\tTimer 2 module disable control:\\n*\\t\\t\\t\\t(a) TIMER2_OFF - Turn off Timer 2 module\\n*\\t\\t\\t\\t(b) TIMER2_ON - Leave Timer 2 module in its default state\\n*\\n* 4. timer1\\t\\tTimer 1 module disable control:\\n*\\t\\t\\t\\t(a) TIMER1_OFF - Turn off Timer 1 module\\n*\\t\\t\\t\\t(b) TIMER1_ON - Leave Timer 1 module in its default state\\n*\\n* 5. timer0\\t\\tTimer 0 module disable control:\\n*\\t\\t\\t\\t(a) TIMER0_OFF - Turn off Timer 0 module\\n*\\t\\t\\t\\t(b) TIMER0_ON - Leave Timer 0 module in its default state\\n*\\n* 6. spi\\t\\tSPI module disable control:\\n*\\t\\t\\t\\t(a) SPI_OFF - Turn off SPI module\\n*\\t\\t\\t\\t(b) SPI_ON - Leave SPI module in its default state\\n*\\n* 7. usart1\\t\\tUSART1 module disable control:\\n*\\t\\t\\t\\t(a) USART1_OFF - Turn off USART1 module\\n*\\t\\t\\t\\t(b) USART1_ON - Leave USART1 module in its default state\\n*\\n* 8. usart0\\t\\tUSART0 module disable control:\\n*\\t\\t\\t\\t(a) USART0_OFF - Turn off USART0 module\\n*\\t\\t\\t\\t(b) USART0_ON - Leave USART0 module in its default state\\n*\\n* 9. twi\\t\\tTWI module disable control:\\n*\\t\\t\\t\\t(a) TWI_OFF - Turn off TWI module\\n*\\t\\t\\t\\t(b) TWI_ON - Leave TWI module in its default state\\n*\\n*******************************************************************************/\\n#if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega1284P__)\\nvoid\\tLowPowerClass::idle(period_t period, adc_t adc, timer2_t timer2,\\n\\t\\t\\t\\t\\t\\t\\ttimer1_t timer1, timer0_t timer0, spi_t spi,\\n\\t\\t\\t\\t\\t\\t\\tusart1_t usart1, usart0_t usart0, twi_t twi)\\n{\\n\\t// Temporary clock source variable\\n\\tunsigned char clockSource = 0;\\n\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n\\t\\t// Store current setting\\n clockSource = TCCR2B;\\n\\n\\t\\t// Remove the clock source to shutdown Timer2\\n\\t\\tTCCR2B &= ~(1 << CS22);\\n\\t\\tTCCR2B &= ~(1 << CS21);\\n\\t\\tTCCR2B &= ~(1 << CS20);\\n\\n\\t\\tpower_timer2_disable();\\n\\t}\\n\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tADCSRA &= ~(1 << ADEN);\\n\\t\\tpower_adc_disable();\\n\\t}\\n\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_disable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_disable();\\n\\tif (spi == SPI_OFF)\\t\\t power_spi_disable();\\n\\tif (usart1 == USART1_OFF)\\tpower_usart1_disable();\\n\\tif (usart0 == USART0_OFF)\\tpower_usart0_disable();\\n\\tif (twi == TWI_OFF)\\t\\t\\tpower_twi_disable();\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\n\\tlowPowerBodOn(SLEEP_MODE_IDLE);\\n\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tpower_adc_enable();\\n\\t\\tADCSRA |= (1 << ADEN);\\n\\t}\\n\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n // Restore previous setting\\n TCCR2B = clockSource;\\n\\n\\t\\tpower_timer2_enable();\\n\\t}\\n\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_enable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_enable();\\n\\tif (spi == SPI_OFF)\\t\\t\\tpower_spi_enable();\\n\\tif (usart1 == USART1_OFF)\\tpower_usart1_enable();\\n\\tif (usart0 == USART0_OFF)\\tpower_usart0_enable();\\n\\tif (twi == TWI_OFF)\\t\\t\\tpower_twi_enable();\\n}\\n#endif\\n\\n/*******************************************************************************\\n* Name: idle\\n* Description: Putting ATmega2560 & ATmega1280 into idle state. Please make sure\\n*\\t\\t\\t you understand the implication and result of disabling module.\\n*\\t\\t\\t Take note that extra Timer 5, 4, 3 compared to an ATmega328P/168.\\n*\\t\\t\\t Also take note that extra USART 3, 2, 1 compared to an\\n*\\t\\t\\t ATmega328P/168.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control:\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. timer5\\t\\tTimer 5 module disable control:\\n*\\t\\t\\t\\t(a) TIMER5_OFF - Turn off Timer 5 module\\n*\\t\\t\\t\\t(b) TIMER5_ON - Leave Timer 5 module in its default state\\n*\\n* 4. timer4\\t\\tTimer 4 module disable control:\\n*\\t\\t\\t\\t(a) TIMER4_OFF - Turn off Timer 4 module\\n*\\t\\t\\t\\t(b) TIMER4_ON - Leave Timer 4 module in its default state\\n*\\n* 5. timer3\\t\\tTimer 3 module disable control:\\n*\\t\\t\\t\\t(a) TIMER3_OFF - Turn off Timer 3 module\\n*\\t\\t\\t\\t(b) TIMER3_ON - Leave Timer 3 module in its default state\\n*\\n* 6. timer2\\t\\tTimer 2 module disable control:\\n*\\t\\t\\t\\t(a) TIMER2_OFF - Turn off Timer 2 module\\n*\\t\\t\\t\\t(b) TIMER2_ON - Leave Timer 2 module in its default state\\n*\\n* 7. timer1\\t\\tTimer 1 module disable control:\\n*\\t\\t\\t\\t(a) TIMER1_OFF - Turn off Timer 1 module\\n*\\t\\t\\t\\t(b) TIMER1_ON - Leave Timer 1 module in its default state\\n*\\n* 8. timer0\\t\\tTimer 0 module disable control:\\n*\\t\\t\\t\\t(a) TIMER0_OFF - Turn off Timer 0 module\\n*\\t\\t\\t\\t(b) TIMER0_ON - Leave Timer 0 module in its default state\\n*\\n* 9. spi\\t\\tSPI module disable control:\\n*\\t\\t\\t\\t(a) SPI_OFF - Turn off SPI module\\n*\\t\\t\\t\\t(b) SPI_ON - Leave SPI module in its default state\\n*\\n* 10.usart3\\t\\tUSART3 module disable control:\\n*\\t\\t\\t\\t(a) USART3_OFF - Turn off USART3 module\\n*\\t\\t\\t\\t(b) USART3_ON - Leave USART3 module in its default state\\n*\\n* 11.usart2\\t\\tUSART2 module disable control:\\n*\\t\\t\\t\\t(a) USART2_OFF - Turn off USART2 module\\n*\\t\\t\\t\\t(b) USART2_ON - Leave USART2 module in its default state\\n*\\n* 12.usart1\\t\\tUSART1 module disable control:\\n*\\t\\t\\t\\t(a) USART1_OFF - Turn off USART1 module\\n*\\t\\t\\t\\t(b) USART1_ON - Leave USART1 module in its default state\\n*\\n* 13.usart0\\t\\tUSART0 module disable control:\\n*\\t\\t\\t\\t(a) USART0_OFF - Turn off USART0 module\\n*\\t\\t\\t\\t(b) USART0_ON - Leave USART0 module in its default state\\n*\\n* 14.twi\\t\\tTWI module disable control:\\n*\\t\\t\\t\\t(a) TWI_OFF - Turn off TWI module\\n*\\t\\t\\t\\t(b) TWI_ON - Leave TWI module in its default state\\n*\\n*******************************************************************************/\\n#if defined (__AVR_ATmega2560__) || defined (__AVR_ATmega1280__)\\nvoid\\tLowPowerClass::idle(period_t period, adc_t adc, timer5_t timer5,\\n\\t\\t\\t\\t\\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\\n\\t\\t\\t\\t\\t\\t\\ttimer1_t timer1, timer0_t timer0, spi_t spi,\\n\\t\\t\\t\\t\\t\\t\\tusart3_t usart3, usart2_t usart2, usart1_t usart1,\\n\\t\\t\\t usart0_t usart0, twi_t twi)\\n{\\n\\t// Temporary clock source variable\\n\\tunsigned char clockSource = 0;\\n\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n\\t\\t// Store current setting\\n clockSource = TCCR2B;\\n\\n\\t\\t// Remove the clock source to shutdown Timer2\\n\\t\\tTCCR2B &= ~(1 << CS22);\\n\\t\\tTCCR2B &= ~(1 << CS21);\\n\\t\\tTCCR2B &= ~(1 << CS20);\\n\\n\\t\\tpower_timer2_disable();\\n\\t}\\n\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tADCSRA &= ~(1 << ADEN);\\n\\t\\tpower_adc_disable();\\n\\t}\\n\\n\\tif (timer5 == TIMER5_OFF)\\tpower_timer5_disable();\\n\\tif (timer4 == TIMER4_OFF)\\tpower_timer4_disable();\\n\\tif (timer3 == TIMER3_OFF)\\tpower_timer3_disable();\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_disable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_disable();\\n\\tif (spi == SPI_OFF)\\t\\t power_spi_disable();\\n\\tif (usart3 == USART3_OFF)\\tpower_usart3_disable();\\n\\tif (usart2 == USART2_OFF)\\tpower_usart2_disable();\\n\\tif (usart1 == USART1_OFF)\\tpower_usart1_disable();\\n\\tif (usart0 == USART0_OFF)\\tpower_usart0_disable();\\n\\tif (twi == TWI_OFF)\\t\\t\\tpower_twi_disable();\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\n\\tlowPowerBodOn(SLEEP_MODE_IDLE);\\n\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tpower_adc_enable();\\n\\t\\tADCSRA |= (1 << ADEN);\\n\\t}\\n\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n // Restore previous setting\\n TCCR2B = clockSource;\\n\\n\\t\\tpower_timer2_enable();\\n\\t}\\n\\n\\tif (timer5 == TIMER5_OFF)\\tpower_timer5_enable();\\n\\tif (timer4 == TIMER4_OFF)\\tpower_timer4_enable();\\n\\tif (timer3 == TIMER3_OFF)\\tpower_timer3_enable();\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_enable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_enable();\\n\\tif (spi == SPI_OFF)\\t\\t\\tpower_spi_enable();\\n\\tif (usart3 == USART3_OFF)\\tpower_usart3_enable();\\n\\tif (usart2 == USART2_OFF)\\tpower_usart2_enable();\\n\\tif (usart1 == USART1_OFF)\\tpower_usart1_enable();\\n\\tif (usart0 == USART0_OFF)\\tpower_usart0_enable();\\n\\tif (twi == TWI_OFF)\\t\\t\\tpower_twi_enable();\\n}\\n#endif\\n\\n/*******************************************************************************\\n* Name: idle\\n* Description: Putting ATmega256RFR2 into idle state. Please make sure\\n*\\t\\t\\t you understand the implication and result of disabling module.\\n*\\t\\t\\t Take note that extra Timer 5, 4, 3 compared to an ATmega328P/168.\\n*\\t\\t\\t Also take note that extra USART 1 compared to an\\n*\\t\\t\\t ATmega328P/168.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control:\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. timer5\\t\\tTimer 5 module disable control:\\n*\\t\\t\\t\\t(a) TIMER5_OFF - Turn off Timer 5 module\\n*\\t\\t\\t\\t(b) TIMER5_ON - Leave Timer 5 module in its default state\\n*\\n* 4. timer4\\t\\tTimer 4 module disable control:\\n*\\t\\t\\t\\t(a) TIMER4_OFF - Turn off Timer 4 module\\n*\\t\\t\\t\\t(b) TIMER4_ON - Leave Timer 4 module in its default state\\n*\\n* 5. timer3\\t\\tTimer 3 module disable control:\\n*\\t\\t\\t\\t(a) TIMER3_OFF - Turn off Timer 3 module\\n*\\t\\t\\t\\t(b) TIMER3_ON - Leave Timer 3 module in its default state\\n*\\n* 6. timer2\\t\\tTimer 2 module disable control:\\n*\\t\\t\\t\\t(a) TIMER2_OFF - Turn off Timer 2 module\\n*\\t\\t\\t\\t(b) TIMER2_ON - Leave Timer 2 module in its default state\\n*\\n* 7. timer1\\t\\tTimer 1 module disable control:\\n*\\t\\t\\t\\t(a) TIMER1_OFF - Turn off Timer 1 module\\n*\\t\\t\\t\\t(b) TIMER1_ON - Leave Timer 1 module in its default state\\n*\\n* 8. timer0\\t\\tTimer 0 module disable control:\\n*\\t\\t\\t\\t(a) TIMER0_OFF - Turn off Timer 0 module\\n*\\t\\t\\t\\t(b) TIMER0_ON - Leave Timer 0 module in its default state\\n*\\n* 9. spi\\t\\tSPI module disable control:\\n*\\t\\t\\t\\t(a) SPI_OFF - Turn off SPI module\\n*\\t\\t\\t\\t(b) SPI_ON - Leave SPI module in its default state\\n*\\n* 10.usart1\\t\\tUSART1 module disable control:\\n*\\t\\t\\t\\t(a) USART1_OFF - Turn off USART1 module\\n*\\t\\t\\t\\t(b) USART1_ON - Leave USART1 module in its default state\\n*\\n* 11.usart0\\t\\tUSART0 module disable control:\\n*\\t\\t\\t\\t(a) USART0_OFF - Turn off USART0 module\\n*\\t\\t\\t\\t(b) USART0_ON - Leave USART0 module in its default state\\n*\\n* 12.twi\\t\\tTWI module disable control:\\n*\\t\\t\\t\\t(a) TWI_OFF - Turn off TWI module\\n*\\t\\t\\t\\t(b) TWI_ON - Leave TWI module in its default state\\n*\\n*******************************************************************************/\\n#if defined (__AVR_ATmega256RFR2__)\\nvoid\\tLowPowerClass::idle(period_t period, adc_t adc, timer5_t timer5,\\n\\t\\t\\t\\t\\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttimer1_t timer1, timer0_t timer0, spi_t spi,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tusart1_t usart1,\\n\\t\\t\\t usart0_t usart0, twi_t twi)\\n{\\n\\t// Temporary clock source variable\\n\\tunsigned char clockSource = 0;\\n\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n\\t\\t// Store current setting\\n clockSource = TCCR2B;\\n\\n\\t\\t// Remove the clock source to shutdown Timer2\\n\\t\\tTCCR2B &= ~(1 << CS22);\\n\\t\\tTCCR2B &= ~(1 << CS21);\\n\\t\\tTCCR2B &= ~(1 << CS20);\\n\\n\\t\\tpower_timer2_disable();\\n\\t}\\n\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tADCSRA &= ~(1 << ADEN);\\n\\t\\tpower_adc_disable();\\n\\t}\\n\\n\\tif (timer5 == TIMER5_OFF)\\tpower_timer5_disable();\\n\\tif (timer4 == TIMER4_OFF)\\tpower_timer4_disable();\\n\\tif (timer3 == TIMER3_OFF)\\tpower_timer3_disable();\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_disable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_disable();\\n\\tif (spi == SPI_OFF)\\t\\t\\t power_spi_disable();\\n\\tif (usart1 == USART1_OFF)\\tpower_usart1_disable();\\n\\tif (usart0 == USART0_OFF)\\tpower_usart0_disable();\\n\\tif (twi == TWI_OFF)\\t\\t\\t power_twi_disable();\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\n\\tlowPowerBodOn(SLEEP_MODE_IDLE);\\n\\n\\tif (adc == ADC_OFF)\\n\\t{\\n\\t\\tpower_adc_enable();\\n\\t\\tADCSRA |= (1 << ADEN);\\n\\t}\\n\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n // Restore previous setting\\n TCCR2B = clockSource;\\n\\n\\t\\tpower_timer2_enable();\\n\\t}\\n\\n\\tif (timer5 == TIMER5_OFF)\\tpower_timer5_enable();\\n\\tif (timer4 == TIMER4_OFF)\\tpower_timer4_enable();\\n\\tif (timer3 == TIMER3_OFF)\\tpower_timer3_enable();\\n\\tif (timer1 == TIMER1_OFF)\\tpower_timer1_enable();\\n\\tif (timer0 == TIMER0_OFF)\\tpower_timer0_enable();\\n\\tif (spi == SPI_OFF)\\t\\t\\t power_spi_enable();\\n\\tif (usart1 == USART1_OFF)\\tpower_usart1_enable();\\n\\tif (usart0 == USART0_OFF)\\tpower_usart0_enable();\\n\\tif (twi == TWI_OFF)\\t\\t\\t power_twi_enable();\\n}\\n#endif\\n\\n\\n/*******************************************************************************\\n* Name: adcNoiseReduction\\n* Description: Putting microcontroller into ADC noise reduction state. This is\\n*\\t\\t\\t a very useful state when using the ADC to achieve best and low\\n* noise signal.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control. Turning off the ADC module is\\n*\\t\\t\\t\\tbasically removing the purpose of this low power mode.\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. timer2\\t\\tTimer 2 module disable control:\\n*\\t\\t\\t\\t(a) TIMER2_OFF - Turn off Timer 2 module\\n*\\t\\t\\t\\t(b) TIMER2_ON - Leave Timer 2 module in its default state\\n*\\n*******************************************************************************/\\nvoid\\tLowPowerClass::adcNoiseReduction(period_t period, adc_t adc,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t timer2_t timer2)\\n{\\n\\t// Temporary clock source variable\\n\\tunsigned char clockSource = 0;\\n\\n\\t#if !defined(__AVR_ATmega32U4__)\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n\\t\\t// Store current setting\\n clockSource = TCCR2B;\\n\\n\\t\\t// Remove the clock source to shutdown Timer2\\n\\t\\tTCCR2B &= ~(1 << CS22);\\n\\t\\tTCCR2B &= ~(1 << CS21);\\n\\t\\tTCCR2B &= ~(1 << CS20);\\n\\t}\\n\\t#endif\\n\\n\\tif (adc == ADC_OFF)\\tADCSRA &= ~(1 << ADEN);\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\n\\tlowPowerBodOn(SLEEP_MODE_ADC);\\n\\n\\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\\n\\n\\t#if !defined(__AVR_ATmega32U4__)\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n // Restore previous setting\\n TCCR2B = clockSource;\\n\\t}\\n\\t#endif\\n}\\n\\n/*******************************************************************************\\n* Name: powerDown\\n* Description: Putting microcontroller into power down state. This is\\n*\\t\\t\\t the lowest current consumption state. Use this together with\\n*\\t\\t\\t external pin interrupt to wake up through external event\\n*\\t\\t\\t triggering (example: RTC clockout pin, SD card detect pin).\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control. Turning off the ADC module is\\n*\\t\\t\\t\\tbasically removing the purpose of this low power mode.\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. bod\\t\\tBrown Out Detector (BOD) module disable control:\\n*\\t\\t\\t\\t(a) BOD_OFF - Turn off BOD module\\n*\\t\\t\\t\\t(b) BOD_ON - Leave BOD module in its default state\\n*\\n*******************************************************************************/\\nvoid\\tLowPowerClass::powerDown(period_t period, adc_t adc, bod_t bod)\\n{\\n\\tif (adc == ADC_OFF)\\tADCSRA &= ~(1 << ADEN);\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\tif (bod == BOD_OFF)\\n\\t{\\n\\t\\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\\n\\t\\t\\tlowPowerBodOff(SLEEP_MODE_PWR_DOWN);\\n\\t\\t#else\\n\\t\\t\\tlowPowerBodOn(SLEEP_MODE_PWR_DOWN);\\n\\t\\t#endif\\n\\t}\\n\\telse\\n\\t{\\n\\t\\tlowPowerBodOn(SLEEP_MODE_PWR_DOWN);\\n\\t}\\n\\n\\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\\n}\\n\\n/*******************************************************************************\\n* Name: powerSave\\n* Description: Putting microcontroller into power save state. This is\\n*\\t\\t\\t the lowest current consumption state after power down.\\n*\\t\\t\\t Use this state together with an external 32.768 kHz crystal (but\\n*\\t\\t\\t 8/16 MHz crystal/resonator need to be removed) to provide an\\n*\\t\\t\\t asynchronous clock source to Timer 2. Please take note that\\n*\\t\\t\\t Timer 2 is also used by the Arduino core for PWM operation.\\n*\\t\\t\\t Please refer to wiring.c for explanation. Removal of the external\\n*\\t\\t\\t 8/16 MHz crystal/resonator requires the microcontroller to run\\n*\\t\\t\\t on its internal RC oscillator which is not so accurate for time\\n*\\t\\t\\t critical operation.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control. Turning off the ADC module is\\n*\\t\\t\\t\\tbasically removing the purpose of this low power mode.\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. bod\\t\\tBrown Out Detector (BOD) module disable control:\\n*\\t\\t\\t\\t(a) BOD_OFF - Turn off BOD module\\n*\\t\\t\\t\\t(b) BOD_ON - Leave BOD module in its default state\\n*\\n* 4. timer2\\t\\tTimer 2 module disable control:\\n*\\t\\t\\t\\t(a) TIMER2_OFF - Turn off Timer 2 module\\n*\\t\\t\\t\\t(b) TIMER2_ON - Leave Timer 2 module in its default state\\n*\\n*******************************************************************************/\\nvoid\\tLowPowerClass::powerSave(period_t period, adc_t adc, bod_t bod,\\n\\t\\t\\t\\t\\t\\t\\t timer2_t timer2)\\n{\\n\\t// Temporary clock source variable\\n\\tunsigned char clockSource = 0;\\n\\n\\t#if !defined(__AVR_ATmega32U4__)\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n\\t\\t// Store current setting\\n clockSource = TCCR2B;\\n\\n\\t\\t// Remove the clock source to shutdown Timer2\\n\\t\\tTCCR2B &= ~(1 << CS22);\\n\\t\\tTCCR2B &= ~(1 << CS21);\\n\\t\\tTCCR2B &= ~(1 << CS20);\\n\\t}\\n\\t#endif\\n\\n\\tif (adc == ADC_OFF)\\tADCSRA &= ~(1 << ADEN);\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\n\\tif (bod == BOD_OFF)\\n\\t{\\n\\t\\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\\n\\t\\t\\tlowPowerBodOff(SLEEP_MODE_PWR_SAVE);\\n\\t\\t#else\\n\\t\\t\\tlowPowerBodOn(SLEEP_MODE_PWR_SAVE);\\n\\t\\t#endif\\n\\t}\\n\\telse\\n\\t{\\n\\t\\tlowPowerBodOn(SLEEP_MODE_PWR_SAVE);\\n\\t}\\n\\n\\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\\n\\n\\t#if !defined(__AVR_ATmega32U4__)\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n // Restore previous setting\\n TCCR2B = clockSource;\\n\\t}\\n\\t#endif\\n}\\n\\n/*******************************************************************************\\n* Name: powerStandby\\n* Description: Putting microcontroller into power standby state.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control. Turning off the ADC module is\\n*\\t\\t\\t\\tbasically removing the purpose of this low power mode.\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. bod\\t\\tBrown Out Detector (BOD) module disable control:\\n*\\t\\t\\t\\t(a) BOD_OFF - Turn off BOD module\\n*\\t\\t\\t\\t(b) BOD_ON - Leave BOD module in its default state\\n*\\n*******************************************************************************/\\nvoid\\tLowPowerClass::powerStandby(period_t period, adc_t adc, bod_t bod)\\n{\\n\\tif (adc == ADC_OFF)\\tADCSRA &= ~(1 << ADEN);\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\n\\tif (bod == BOD_OFF)\\n\\t{\\n\\t\\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\\n\\t\\t\\tlowPowerBodOff(SLEEP_MODE_STANDBY);\\n\\t\\t#else\\n\\t\\t\\tlowPowerBodOn(SLEEP_MODE_STANDBY);\\n\\t\\t#endif\\n\\t}\\n\\telse\\n\\t{\\n\\t\\tlowPowerBodOn(SLEEP_MODE_STANDBY);\\n\\t}\\n\\n\\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\\n}\\n\\n/*******************************************************************************\\n* Name: powerExtStandby\\n* Description: Putting microcontroller into power extended standby state. This\\n*\\t\\t\\t is different from the power standby state as it has the\\n*\\t\\t\\t capability to run Timer 2 asynchronously.\\n* Not implemented on Atmega88 and Atmega168.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\\n*\\t\\t\\t\\tup resource:\\n*\\t\\t\\t\\t(a) SLEEP_15MS - 15 ms sleep\\n*\\t\\t\\t\\t(b) SLEEP_30MS - 30 ms sleep\\n*\\t\\t\\t\\t(c) SLEEP_60MS - 60 ms sleep\\n*\\t\\t\\t\\t(d) SLEEP_120MS - 120 ms sleep\\n*\\t\\t\\t\\t(e) SLEEP_250MS - 250 ms sleep\\n*\\t\\t\\t\\t(f) SLEEP_500MS - 500 ms sleep\\n*\\t\\t\\t\\t(g) SLEEP_1S - 1 s sleep\\n*\\t\\t\\t\\t(h) SLEEP_2S - 2 s sleep\\n*\\t\\t\\t\\t(i) SLEEP_4S - 4 s sleep\\n*\\t\\t\\t\\t(j) SLEEP_8S - 8 s sleep\\n*\\t\\t\\t\\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\\n*\\n* 2. adc\\t\\tADC module disable control.\\n*\\t\\t\\t\\t(a) ADC_OFF - Turn off ADC module\\n*\\t\\t\\t\\t(b) ADC_ON - Leave ADC module in its default state\\n*\\n* 3. bod\\t\\tBrown Out Detector (BOD) module disable control:\\n*\\t\\t\\t\\t(a) BOD_OFF - Turn off BOD module\\n*\\t\\t\\t\\t(b) BOD_ON - Leave BOD module in its default state\\n*\\n* 4. timer2\\t\\tTimer 2 module disable control:\\n*\\t\\t\\t\\t(a) TIMER2_OFF - Turn off Timer 2 module\\n*\\t\\t\\t\\t(b) TIMER2_ON - Leave Timer 2 module in its default state\\n*\\n*******************************************************************************/\\nvoid\\tLowPowerClass::powerExtStandby(period_t period, adc_t adc, bod_t bod,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t timer2_t timer2)\\n{\\n\\t// Temporary clock source variable\\n\\tunsigned char clockSource = 0;\\n\\n\\t#if !defined(__AVR_ATmega32U4__)\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n\\t\\t// Store current setting\\n clockSource = TCCR2B;\\n\\n\\t\\t// Remove the clock source to shutdown Timer2\\n\\t\\tTCCR2B &= ~(1 << CS22);\\n\\t\\tTCCR2B &= ~(1 << CS21);\\n\\t\\tTCCR2B &= ~(1 << CS20);\\n\\t}\\n\\t#endif\\n\\n\\tif (adc == ADC_OFF)\\tADCSRA &= ~(1 << ADEN);\\n\\n\\tif (period != SLEEP_FOREVER)\\n\\t{\\n\\t\\twdt_enable(period);\\n\\t\\tWDTCSR |= (1 << WDIE);\\n\\t}\\n\\n\\n\\t#if defined (__AVR_ATmega88__) || defined (__AVR_ATmega168__) // SLEEP_MODE_EXT_STANDBY not implemented on Atmega88 / Atmega168\\n\\t#else\\n\\t\\tif (bod == BOD_OFF)\\n\\t\\t{\\n\\t\\t\\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\\n\\t\\t\\t\\tlowPowerBodOff(SLEEP_MODE_EXT_STANDBY);\\n\\t\\t\\t#else\\n\\t\\t\\t\\tlowPowerBodOn(SLEEP_MODE_EXT_STANDBY);\\n\\t\\t\\t#endif\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\tlowPowerBodOn(SLEEP_MODE_EXT_STANDBY);\\n\\t\\t}\\n\\t#endif\\n\\n\\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\\n\\n\\t#if !defined(__AVR_ATmega32U4__)\\n\\tif (timer2 == TIMER2_OFF)\\n\\t{\\n // Restore previous setting\\n TCCR2B = clockSource;\\n\\t}\\n\\t#endif\\n}\\n\\n// sleep # of milliseconds using WDT (watchdog timer - accurate to within 10%, uses about 3uA)\\nvoid LowPowerClass::longPowerDown(uint32_t sleepTime) {\\n do {\\n if (sleepTime > 8000)\\n {\\n powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);\\n sleepTime-=8000;\\n }\\n else if (sleepTime > 4000)\\n {\\n powerDown(SLEEP_4S, ADC_OFF, BOD_OFF);\\n sleepTime-=4000;\\n }\\n else if (sleepTime > 2000)\\n {\\n powerDown(SLEEP_2S, ADC_OFF, BOD_OFF);\\n sleepTime-=2000;\\n }\\n else if (sleepTime > 1000)\\n {\\n powerDown(SLEEP_1S, ADC_OFF, BOD_OFF);\\n sleepTime-=1000;\\n }\\n else if (sleepTime > 512)\\n {\\n powerDown(SLEEP_500MS, ADC_OFF, BOD_OFF);\\n sleepTime-=512;\\n }\\n else if (sleepTime > 256)\\n {\\n powerDown(SLEEP_250MS, ADC_OFF, BOD_OFF);\\n sleepTime-=256;\\n }\\n else if (sleepTime > 128)\\n {\\n powerDown(SLEEP_120MS, ADC_OFF, BOD_OFF);\\n sleepTime-=128;\\n }\\n else if (sleepTime > 64)\\n {\\n powerDown(SLEEP_60MS, ADC_OFF, BOD_OFF);\\n sleepTime-=64;\\n }\\n else if (sleepTime > 32)\\n {\\n powerDown(SLEEP_30MS, ADC_OFF, BOD_OFF);\\n sleepTime-=32;\\n }\\n else if (sleepTime > 16)\\n {\\n powerDown(SLEEP_15MS, ADC_OFF, BOD_OFF);\\n sleepTime-=16;\\n }\\n else\\n {\\n sleepTime=0;\\n }\\n } while(sleepTime);\\n}\\n\\n/*******************************************************************************\\n* Name: ISR (WDT_vect)\\n* Description: Watchdog Timer interrupt service routine. This routine is\\n*\\t\\t required to allow automatic WDIF and WDIE bit clearance in\\n*\\t\\t\\t hardware.\\n*\\n*******************************************************************************/\\nISR (WDT_vect)\\n{\\n\\t// WDIE & WDIF is cleared in hardware upon entering this ISR\\n\\twdt_disable();\\n}\\n\\n#elif defined(__arm__)\\n#if defined(__SAMD21__) || defined(ARDUINO_SAMD_ZERO)\\n/*******************************************************************************\\n* Name: standby\\n* Description: Putting SAMD21G18A into idle mode. This is the lowest current\\n* consumption mode. Requires separate handling of clock and\\n* \\t\\t\\t peripheral management (disabling and shutting down) to achieve\\n* \\t\\t\\t the desired current consumption.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. idleMode Idle mode level (0, 1, 2) where IDLE_2 level provide lowest\\n* \\t\\t\\t\\tcurrent consumption in this mode.\\n*\\n*******************************************************************************/\\nvoid\\tLowPowerClass::idle(idle_t idleMode)\\n{\\n\\tSCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;\\n\\tPM->SLEEP.reg = idleMode;\\n\\t__DSB();\\n\\t__WFI();\\n}\\n\\n/*******************************************************************************\\n* Name: standby\\n* Description: Putting SAMD21G18A into standby mode. This is the lowest current\\n* consumption mode. Use this together with the built-in RTC (use\\n* RTCZero library) or external pin interrupt to wake up through\\n* external event triggering.\\n*\\n* Argument \\tDescription\\n* ========= \\t===========\\n* 1. NIL\\n*\\n*******************************************************************************/\\nvoid\\tLowPowerClass::standby()\\n{\\n\\tSCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;\\n\\t__DSB();\\n\\t__WFI();\\n}\\n\\n#else\\n\\t#error \\\"Please ensure chosen MCU is a SAMD21\\\"\\n#endif\\n#else\\n\\t#error \\\"Processor architecture is not supported.\\\"\\n#endif\\n\\nLowPowerClass LowPower;\" }", "{ filename: \"src/LowPower.h\", code: \"#ifndef LowPower_h\\n#define LowPower_h\\n\\n#include \\\"Arduino.h\\\"\\n\\nenum period_t\\n{\\n\\tSLEEP_15MS,\\n\\tSLEEP_30MS,\\n\\tSLEEP_60MS,\\n\\tSLEEP_120MS,\\n\\tSLEEP_250MS,\\n\\tSLEEP_500MS,\\n\\tSLEEP_1S,\\n\\tSLEEP_2S,\\n\\tSLEEP_4S,\\n\\tSLEEP_8S,\\n\\tSLEEP_FOREVER\\n};\\n\\nenum bod_t\\n{\\n\\tBOD_OFF,\\n\\tBOD_ON\\n};\\n\\nenum adc_t\\n{\\n\\tADC_OFF,\\n\\tADC_ON\\n};\\n\\nenum timer5_t\\n{\\n\\tTIMER5_OFF,\\n\\tTIMER5_ON\\n};\\n\\nenum timer4_t\\n{\\n\\tTIMER4_OFF,\\n\\tTIMER4_ON\\n};\\n\\nenum timer3_t\\n{\\n\\tTIMER3_OFF,\\n\\tTIMER3_ON\\n};\\n\\nenum timer2_t\\n{\\n\\tTIMER2_OFF,\\n\\tTIMER2_ON\\n};\\n\\nenum timer1_t\\n{\\n\\tTIMER1_OFF,\\n\\tTIMER1_ON\\n};\\n\\nenum timer0_t\\n{\\n\\tTIMER0_OFF,\\n\\tTIMER0_ON\\n};\\n\\nenum spi_t\\n{\\n\\tSPI_OFF,\\n\\tSPI_ON\\n};\\n\\nenum usart0_t\\n{\\n\\tUSART0_OFF,\\n\\tUSART0_ON\\n};\\n\\nenum usart1_t\\n{\\n\\tUSART1_OFF,\\n\\tUSART1_ON\\n};\\n\\nenum usart2_t\\n{\\n\\tUSART2_OFF,\\n\\tUSART2_ON\\n};\\n\\nenum usart3_t\\n{\\n\\tUSART3_OFF,\\n\\tUSART3_ON\\n};\\n\\nenum twi_t\\n{\\n\\tTWI_OFF,\\n\\tTWI_ON\\n};\\n\\nenum usb_t\\n{\\n\\tUSB_OFF,\\n\\tUSB_ON\\n};\\n\\nenum idle_t\\n{\\n\\tIDLE_0,\\n\\tIDLE_1,\\n\\tIDLE_2\\n};\\n\\nclass LowPowerClass\\n{\\n\\tpublic:\\n\\t\\t#if defined (__AVR__)\\n\\n\\t\\t\\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168__) || defined (__AVR_ATmega168P__) || defined (__AVR_ATmega88__)\\n\\t\\t\\t\\tvoid\\tidle(period_t period, adc_t adc, timer2_t timer2,\\n\\t\\t\\t\\t\\t\\t timer1_t timer1, timer0_t timer0, spi_t spi,\\n\\t\\t\\t\\t\\t usart0_t usart0, twi_t twi);\\n\\t\\t\\t#elif defined __AVR_ATmega644P__ || defined (__AVR_ATmega1284P__)\\n\\t\\t\\t\\tvoid\\tidle(period_t period, adc_t adc, timer2_t timer2,\\n\\t\\t\\t\\t\\t\\t\\t timer1_t timer1, timer0_t timer0, spi_t spi,\\n\\t\\t\\t\\t\\t\\t\\t usart1_t usart1, usart0_t usart0, twi_t twi);\\n\\t\\t\\t#elif defined __AVR_ATmega2560__\\n\\t\\t\\t\\tvoid\\tidle(period_t period, adc_t adc, timer5_t timer5,\\n\\t\\t\\t\\t\\t\\t\\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\\n\\t\\t\\t\\t\\t\\t\\t timer1_t timer1, timer0_t timer0, spi_t spi,\\n\\t\\t\\t\\t\\t\\t\\t usart3_t usart3, usart2_t usart2, usart1_t usart1,\\n\\t\\t\\t\\t\\t\\t\\t usart0_t usart0, twi_t twi);\\n\\t\\t\\t#elif defined __AVR_ATmega256RFR2__\\n\\t\\t\\t\\tvoid\\tidle(period_t period, adc_t adc, timer5_t timer5,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\\n\\t\\t\\t\\t \\t\\t\\t\\t timer1_t timer1, timer0_t timer0, spi_t spi,\\n\\t\\t\\t\\t\\t\\t usart1_t usart1,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t usart0_t usart0, twi_t twi);\\n\\t\\t\\t#elif defined __AVR_ATmega32U4__\\n\\t\\t\\t\\tvoid\\tidle(period_t period, adc_t adc, timer4_t timer4,\\n\\t\\t\\t\\t timer3_t timer3, timer1_t timer1, timer0_t timer0,\\n\\t\\t\\t\\t spi_t spi, usart1_t usart1, twi_t twi, usb_t usb);\\n\\t\\t\\t#else\\n\\t\\t\\t\\t#error \\\"Please ensure chosen MCU is either 88, 168, 168P, 328P, 32U4, 2560 or 256RFR2.\\\"\\n\\t\\t\\t#endif\\n\\t\\t\\tvoid\\tadcNoiseReduction(period_t period, adc_t adc, timer2_t timer2) __attribute__((optimize(\\\"-O1\\\")));\\n\\t\\t\\tvoid\\tpowerDown(period_t period, adc_t adc, bod_t bod) __attribute__((optimize(\\\"-O1\\\")));\\n\\t\\t\\tvoid\\tpowerSave(period_t period, adc_t adc, bod_t bod, timer2_t timer2) __attribute__((optimize(\\\"-O1\\\")));\\n\\t\\t\\tvoid\\tpowerStandby(period_t period, adc_t adc, bod_t bod) __attribute__((optimize(\\\"-O1\\\")));\\n\\t\\t\\tvoid\\tpowerExtStandby(period_t period, adc_t adc, bod_t bod, timer2_t timer2) __attribute__((optimize(\\\"-O1\\\")));\\n void longPowerDown(uint32_t sleepTime);\\n\\t\\t#elif defined (__arm__)\\n\\t\\t\\t#if defined(__SAMD21__) || defined(ARDUINO_SAMD_ZERO)\\n\\t\\t\\t\\tvoid\\tidle(idle_t idleMode);\\n\\t\\t\\t\\tvoid\\tstandby();\\n\\t\\t\\t#else\\n\\t\\t\\t\\t#error \\\"Please ensure chosen MCU is a SAMD21\\\"\\n\\t\\t\\t#endif\\n\\n\\t\\t#else\\n\\n\\t\\t\\t#error \\\"Processor architecture is not supported.\\\"\\n\\n\\t\\t#endif\\n};\\n\\nextern LowPowerClass LowPower;\\n#endif\" }" ];PK }'VEsrc/facepanels.jsexport default {};PK }'V_[[src/exthandler.jsconst ExtHandler = { // when extension is loaded onLoad(app, target) {}, // when extension is unloaded onUnload(app) { // TODO }, // when device is connected onConnect(app, device) { // TODO }, // when device is disconnected onDisconnect(app, device) { // TODO }, // when stop button is clicked onStopAll(app, device) { // TODO }, // before switch to upload mode beforeChangeUploadMode(app, device) { // TODO return true; }, // before switch to debug mode beforeChangeDebugMode(app, device) { // TODO return true; }, // after switched to upload mode afterChangeUploadMode(app, device) { // TODO return true; }, // after switched to debug mode afterChangeDebugMode(app, device) { // TODO return true; }, // when device is selected onSelect(app, device) { // TODO }, // when device is unselected onUnselect(app, device) { // TODO }, // before upload code beforeCodeUpload(app, device) { // TODO }, // after code uploaded afterCodeUpload(app, device) { // TODO }, // when receiving and reading byte onRead(app, device) { // TODO } } export default ExtHandler;PK }'VNEEEsrc/handlerProxy.jsself.rpc.CONFIG.TIMEOUT = 42000; self.rpc.CONFIG.HEARTBEAT = 4200; const __context = { app: self.rpc.remote.app, getDevice: function getDevice(deviceId) { return new Proxy({}, { get(target, name) { if (name == "id") { return deviceId; } return function (...args) { let runDevice = __context.app.runDevice; return runDevice(deviceId, name, ...args); }; } }); } }; !function (global) { "use strict"; var Op = Object.prototype; var hasOwn = Op.hasOwnProperty; var undefined; var $Symbol = typeof Symbol === "function" ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || "@@iterator"; var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; var inModule = typeof module === "object"; var runtime = global.regeneratorRuntime; if (runtime) { if (inModule) { module.exports = runtime; } return; } runtime = global.regeneratorRuntime = inModule ? module.exports || {} : {}; function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; var generator = Object.create(protoGenerator.prototype); var context = new Context(tryLocsList || []); generator._invoke = makeInvokeMethod(innerFn, self, context); return generator; } runtime.wrap = wrap; function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } var GenStateSuspendedStart = "suspendedStart"; var GenStateSuspendedYield = "suspendedYield"; var GenStateExecuting = "executing"; var GenStateCompleted = "completed"; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; IteratorPrototype[iteratorSymbol] = function () { return this; }; var getProto = Object.getPrototypeOf; var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { IteratorPrototype = NativeIteratorPrototype; } var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; GeneratorFunctionPrototype.constructor = GeneratorFunction; GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { prototype[method] = function (arg) { return this._invoke(method, arg); }; }); } runtime.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; runtime.mark = function (genFun) { if (Object.setPrototypeOf) { Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); } else { genFun.__proto__ = GeneratorFunctionPrototype; if (!(toStringTagSymbol in genFun)) { genFun[toStringTagSymbol] = "GeneratorFunction"; } } genFun.prototype = Object.create(Gp); return genFun; }; runtime.awrap = function (arg) { return { __await: arg }; }; function AsyncIterator(generator) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (record.type === "throw") { reject(record.arg); } else { var result = record.arg; var value = result.value; if (value && typeof value === "object" && hasOwn.call(value, "__await")) { return Promise.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }); } return Promise.resolve(value).then(function (unwrapped) { result.value = unwrapped; resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } } var previousPromise; function enqueue(method, arg) { function callInvokeWithMethodAndArg() { return new Promise(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } this._invoke = enqueue; } defineIteratorMethods(AsyncIterator.prototype); AsyncIterator.prototype[asyncIteratorSymbol] = function () { return this; }; runtime.AsyncIterator = AsyncIterator; runtime.async = function (innerFn, outerFn, self, tryLocsList) { var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }; function makeInvokeMethod(innerFn, self, context) { var state = GenStateSuspendedStart; return function invoke(method, arg) { if (state === GenStateExecuting) { throw new Error("Generator is already running"); } if (state === GenStateCompleted) { if (method === "throw") { throw arg; } return doneResult(); } context.method = method; context.arg = arg; while (true) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if (context.method === "next") { context.sent = context._sent = context.arg; } else if (context.method === "throw") { if (state === GenStateSuspendedStart) { state = GenStateCompleted; throw context.arg; } context.dispatchException(context.arg); } else if (context.method === "return") { context.abrupt("return", context.arg); } state = GenStateExecuting; var record = tryCatch(innerFn, self, context); if (record.type === "normal") { state = context.done ? GenStateCompleted : GenStateSuspendedYield; if (record.arg === ContinueSentinel) { continue; } return { value: record.arg, done: context.done }; } else if (record.type === "throw") { state = GenStateCompleted; context.method = "throw"; context.arg = record.arg; } } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (method === undefined) { context.delegate = null; if (context.method === "throw") { if (delegate.iterator.return) { context.method = "return"; context.arg = undefined; maybeInvokeDelegate(delegate, context); if (context.method === "throw") { return ContinueSentinel; } } context.method = "throw"; context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if (record.type === "throw") { context.method = "throw"; context.arg = record.arg; context.delegate = null; return ContinueSentinel; } var info = record.arg; if (!info) { context.method = "throw"; context.arg = new TypeError("iterator result is not an object"); context.delegate = null; return ContinueSentinel; } if (info.done) { context[delegate.resultName] = info.value; context.next = delegate.nextLoc; if (context.method !== "return") { context.method = "next"; context.arg = undefined; } } else { return info; } context.delegate = null; return ContinueSentinel; } defineIteratorMethods(Gp); Gp[toStringTagSymbol] = "Generator"; Gp[iteratorSymbol] = function () { return this; }; Gp.toString = function () { return "[object Generator]"; }; function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; if (1 in locs) { entry.catchLoc = locs[1]; } if (2 in locs) { entry.finallyLoc = locs[2]; entry.afterLoc = locs[3]; } this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal"; delete record.arg; entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }]; tryLocsList.forEach(pushTryEntry, this); this.reset(true); } runtime.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } keys.reverse(); return function next() { while (keys.length) { var key = keys.pop(); if (key in object) { next.value = key; next.done = false; return next; } } next.done = true; return next; }; }; function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) { return iteratorMethod.call(iterable); } if (typeof iterable.next === "function") { return iterable; } if (!isNaN(iterable.length)) { var i = -1, next = function next() { while (++i < iterable.length) { if (hasOwn.call(iterable, i)) { next.value = iterable[i]; next.done = false; return next; } } next.value = undefined; next.done = true; return next; }; return next.next = next; } } return { next: doneResult }; } runtime.values = values; function doneResult() { return { value: undefined, done: true }; } Context.prototype = { constructor: Context, reset: function (skipTempReset) { this.prev = 0; this.next = 0; this.sent = this._sent = undefined; this.done = false; this.delegate = null; this.method = "next"; this.arg = undefined; this.tryEntries.forEach(resetTryEntry); if (!skipTempReset) { for (var name in this) { if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { this[name] = undefined; } } } }, stop: function () { this.done = true; var rootEntry = this.tryEntries[0]; var rootRecord = rootEntry.completion; if (rootRecord.type === "throw") { throw rootRecord.arg; } return this.rval; }, dispatchException: function (exception) { if (this.done) { throw exception; } var context = this; function handle(loc, caught) { record.type = "throw"; record.arg = exception; context.next = loc; if (caught) { context.method = "next"; context.arg = undefined; } return !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === "root") { return handle("end"); } if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"); var hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } else if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else if (hasCatch) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } } else if (hasFinally) { if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else { throw new Error("try statement without catch or finally"); } } } }, abrupt: function (type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { finallyEntry = null; } var record = finallyEntry ? finallyEntry.completion : {}; record.type = type; record.arg = arg; if (finallyEntry) { this.method = "next"; this.next = finallyEntry.finallyLoc; return ContinueSentinel; } return this.complete(record); }, complete: function (record, afterLoc) { if (record.type === "throw") { throw record.arg; } if (record.type === "break" || record.type === "continue") { this.next = record.arg; } else if (record.type === "return") { this.rval = this.arg = record.arg; this.method = "return"; this.next = "end"; } else if (record.type === "normal" && afterLoc) { this.next = afterLoc; } return ContinueSentinel; }, finish: function (finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) { this.complete(entry.completion, entry.afterLoc); resetTryEntry(entry); return ContinueSentinel; } } }, "catch": function (tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === "throw") { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function (iterable, resultName, nextLoc) { this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }; if (this.method === "next") { this.arg = undefined; } return ContinueSentinel; } }; }(function () { return this || typeof self === "object" && self; }() || Function("return this")()); const disableBlocks = { debug: [], upload: [] }; const mustLoginBlocks = []; const triggerBlocksStatus = async (mode, app) => {}; const blockHandlers = { 'BLOCK_1656602282019': { onRun: (args, app, device, block) => {} }, 'BLOCK_1656594936925': { onRun: (args, app, device, block) => {} }, 'BLOCK_1656595410179': { onRun: (args, app, device, block) => {} }, 'BLOCK_1656595749942': { onRun: (args, app, device, block) => {} }, 'BLOCK_1656596148335': { onRun: (args, app, device, block) => {} }, 'BLOCK_1656596600428': { onRun: (args, app, device, block) => {} }, 'BLOCK_1656597084419': { onRun: (args, app, device, block) => {} }, 'BLOCK_1656663686735': { onRun: (args, app, device, block) => {} }, 'BLOCK_1656663686984': { onRun: (args, app, device, block) => {} }, 'BLOCK_1656663687195': { onRun: (args, app, device, block) => {} } }; const ExtHandler = { onLoad(app, target) {}, onUnload(app) {}, onConnect(app, device) {}, onDisconnect(app, device) {}, onStopAll(app, device) {}, beforeChangeUploadMode(app, device) { return true; }, beforeChangeDebugMode(app, device) { return true; }, afterChangeUploadMode(app, device) { return true; }, afterChangeDebugMode(app, device) { return true; }, onSelect(app, device) {}, onUnselect(app, device) {}, beforeCodeUpload(app, device) {}, afterCodeUpload(app, device) {}, onRead(app, device) {} }; self.rpc.exports = { runBlock: function runBlock(opcode, method, deviceId, block, args) { var blockHandler = blockHandlers[opcode]; if (!blockHandler) { console.error('cannot find opcode of ' + opcode); return null; } var handle = blockHandler[method]; let app = __context.app; let device = __context.getDevice(deviceId); if (method === 'onRun') { return handle(args, app, device, block); } else { return handle(app, device, block); } }, runExtension: function runExtension(srcMethod, deviceId) { var method = ExtHandler[srcMethod]; if (!method) { console.error('method of ' + srcMethod + ' is no valid'); return null; } let app = __context.app; if (deviceId) { let device = __context.getDevice(deviceId); return method(app, device); } else { return method(app); } } };PK }'V src/cates/PK }'Vsrc/cates/cate_a925a78d/PK }'Vg src/cates/cate_a925a78d/index.jsimport blocks from './blocks.js'; const cate_a925a78d = (facepanels) => ({ "name": "cate_a925a78d", "colors": [ "#B39DDB", "#9E82D1", "#8866C7" ], "menuIconURI": "", "blockIcon": { "type": "image", "width": 28, "height": 26, "src": window.MbApi.getExtResPath('vdr_df3231_lowpower/imgs/98d512dcdecd49de87d221d760624838.png', 'vdr_df3231_lowpower') }, "blocks": blocks(facepanels), "menus": { "BLOCK_1656595749942_MODE": [{ "text": "BLOCK_1656595749942_MODE_0", "value": "0" }, { "text": "BLOCK_1656595749942_MODE_1", "value": "1" }, { "text": "BLOCK_1656595749942_MODE_2", "value": "2" }, { "text": "BLOCK_1656595749942_MODE_3", "value": "3" }, { "text": "BLOCK_1656595749942_MODE_4", "value": "4" }, { "text": "BLOCK_1656595749942_MODE_5", "value": "5" } ], "BLOCK_1656596148335_MODE": [{ "text": "BLOCK_1656596148335_MODE_0", "value": "0" }, { "text": "BLOCK_1656596148335_MODE_1", "value": "1" } ], "BLOCK_1656596600428_ALARM": [{ "text": "BLOCK_1656596600428_ALARM_0", "value": "1" }, { "text": "BLOCK_1656596600428_ALARM_1", "value": "2" } ], "BLOCK_1656596600428_PINDIGIT": [{ "text": "BLOCK_1656596600428_PINDIGIT_0", "value": "2" }, { "text": "BLOCK_1656596600428_PINDIGIT_1", "value": "3" }, { "text": "BLOCK_1656596600428_PINDIGIT_2", "value": "4" }, { "text": "BLOCK_1656596600428_PINDIGIT_3", "value": "5" }, { "text": "BLOCK_1656596600428_PINDIGIT_4", "value": "6" }, { "text": "BLOCK_1656596600428_PINDIGIT_5", "value": "7" }, { "text": "BLOCK_1656596600428_PINDIGIT_6", "value": "8" } ], "BLOCK_1656596600428_MODE": [{ "text": "BLOCK_1656596600428_MODE_0", "value": "0" }, { "text": "BLOCK_1656596600428_MODE_1", "value": "1" }, { "text": "BLOCK_1656596600428_MODE_2", "value": "2" } ] } }); export default cate_a925a78d;PK }'Vsrc/cates/cate_4b4990e1/PK }'V t* src/cates/cate_4b4990e1/index.jsimport blocks from './blocks.js'; const cate_4b4990e1 = (facepanels) => ({ "name": "cate_4b4990e1", "colors": [ "#6739B6", "#5D33A4", "#522E92" ], "menuIconURI": "", "blockIcon": { "type": "image", "width": 28, "height": 26, "src": window.MbApi.getExtResPath('vdr_df3231_lowpower/imgs/5400cbe10720481c814bced8ad030a0d.png', 'vdr_df3231_lowpower') }, "blocks": blocks(facepanels), "menus": { "BLOCK_1656663686735_PINDIGIT": [{ "text": "BLOCK_1656663686735_PINDIGIT_0", "value": "2" }, { "text": "BLOCK_1656663686735_PINDIGIT_1", "value": "3" } ] } }); export default cate_4b4990e1;PK }'V src/cates/index.jsimport cate_a925a78d from './cate_a925a78d/index.js'; import cate_4b4990e1 from './cate_4b4990e1/index.js'; const cates = (facepanels) => ([ cate_a925a78d(facepanels), cate_4b4990e1(facepanels) ]); export default cates;PK }'VCd  !src/cates/cate_a925a78d/blocks.jsconst blocks = (extFacePanels) => ([{ "opcode": "BLOCK_1656602282019", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": {}, "branchCount": 0, "codes": { "arduinoc": { "sections": { "include": [ "\"src/DS3231.h\"" ], "declare": `DS3231 DS3231_clock;\r\nbool DS3231_isWakeUP = false;\r\nbool DS3231_isTime = false;\r\nint DS3231_i = 0;\r` } } }, "handler": this.funcs.BLOCK_1656602282019 }, { "opcode": "BLOCK_1656594936925", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": { "heure": { "type": "number", "defaultValue": 20 }, "minute": { "type": "number", "defaultValue": 15 }, "seconde": { "type": "number", "defaultValue": 30 } }, "branchCount": 0, "codes": { "arduinoc": { "code": `DS3231_clock.setHour(/*{heure}*/);\r\nDS3231_clock.setMinute(/*{minute}*/);\r\nDS3231_clock.setSecond(/*{seconde}*/);` } }, "handler": this.funcs.BLOCK_1656594936925 }, { "opcode": "BLOCK_1656595410179", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": { "date": { "type": "number", "defaultValue": 20 }, "mois": { "type": "number", "defaultValue": 6 }, "annee": { "type": "number", "defaultValue": 2022 } }, "branchCount": 0, "codes": { "arduinoc": { "code": `DS3231_clock.setDate(/*{date}*/);\r\nDS3231_clock.setMonth(/*{mois}*/);\r\nDS3231_clock.setYear((/*{annee}*/>1000) ? /*{annee}*/ % 100 : /*{annee}*/);` } }, "handler": this.funcs.BLOCK_1656595410179 }, { "opcode": "BLOCK_1656595749942", "blockType": "number", "checkboxInFlyout": false, "gap": 12, "arguments": { "mode": { "type": "fieldMenu", "defaultValue": "0", "menu": "BLOCK_1656595749942_MODE" } }, "branchCount": 0, "codes": { "arduinoc": { "code": `DS3231_getTime(/*{mode}*/)`, "sections": { "declare": `int DS3231_getTime(int mode){\r\n bool b=false;\r\n switch (mode) {\r\n case 0:\r\n return int(DS3231_clock.getHour(b, b));\r\n break;\r\n case 1:\r\n return int(DS3231_clock.getMinute());\r\n break;\r\n case 2:\r\n return int(DS3231_clock.getSecond());\r\n break;\r\n case 3:\r\n return int(DS3231_clock.getDate());\r\n break;\r\n case 4:\r\n return int(DS3231_clock.getMonth(b));\r\n break;\r\n case 5:\r\n return int(DS3231_clock.getYear());\r\n break; \r\n }\r\n}` } } }, "handler": this.funcs.BLOCK_1656595749942 }, { "opcode": "BLOCK_1656596148335", "blockType": "string", "checkboxInFlyout": false, "gap": 12, "arguments": { "mode": { "type": "fieldMenu", "defaultValue": "0", "menu": "BLOCK_1656596148335_MODE" } }, "branchCount": 0, "codes": { "arduinoc": { "code": `DS3231_getSTime(/*{mode}*/)`, "sections": { "declare": `String strTimeFormat(byte value){\r\n String s;\r\n s=String(value, DEC);\r\n if (s.length()==1) s = \"0\"+s;\r\n return s;\r\n}\r\n\r\nString DS3231_getSTime(int mode){\r\n String s;\r\n bool b=false;\r\n if (mode==0){\r\n s = strTimeFormat(DS3231_clock.getHour(b, b));\r\n s += \":\";\r\n s += strTimeFormat(DS3231_clock.getMinute()); \r\n s += \":\";\r\n s += strTimeFormat(DS3231_clock.getSecond());\r\n }else if (mode==1){\r\n s = strTimeFormat(DS3231_clock.getDate()); \r\n s += \"/\";\r\n s += strTimeFormat(DS3231_clock.getMonth(b)); \r\n s += \"/\";\r\n s += strTimeFormat(DS3231_clock.getYear());\r\n }\r\n return s;\r\n}` } } }, "handler": this.funcs.BLOCK_1656596148335 }, { "opcode": "BLOCK_1656596600428", "blockType": "conditional", "checkboxInFlyout": false, "gap": 12, "arguments": { "alarm": { "type": "fieldMenu", "defaultValue": "1", "menu": "BLOCK_1656596600428_ALARM" }, "pinDigit": { "type": "fieldMenu", "defaultValue": "2", "menu": "BLOCK_1656596600428_PINDIGIT" }, "i": { "type": "number", "defaultValue": 1 }, "mode": { "type": "fieldMenu", "defaultValue": "0", "menu": "BLOCK_1656596600428_MODE" } }, "branchCount": 1, "codes": { "arduinoc": { "code": `DS3231_setAlarm(/*{alarm}*/,/*{mode}*/);`, "sections": { "declare": `void DS3231_setAlarm(int alarm, int mode){\r\n if(alarm==1){\r\n DS3231_clock.turnOffAlarm(1);\r\n switch (mode) {\r\n case 0: // quand les secondes valent x\r\n DS3231_clock.setA1Time(0, 0, 0, 0, 0b1110, false, false, false); \r\n break;\r\n case 1: // quand les minutes valent x\r\n DS3231_clock.setA1Time(0, 0, 0, 0, 0b1100, false, false, false); \r\n break;\r\n case 2: // quand les heures valent x\r\n DS3231_clock.setA1Time(0, 0, 0, 0, 0b1000, false, false, false); \r\n break;\r\n }\r\n DS3231_clock.turnOnAlarm(1);\r\n }else if(alarm==2){\r\n DS3231_clock.turnOffAlarm(2);\r\n switch (mode) {\r\n case 0: // quand les minutes valent 0\r\n DS3231_clock.setA2Time(0, 0, 0, 0b111, false, false, false); \r\n break;\r\n case 1: // quand les minutes valent x\r\n DS3231_clock.setA2Time(0, 0, 0, 0b110, false, false, false); \r\n break;\r\n case 2: // quand les heures valent x\r\n DS3231_clock.setA2Time(0, 0, 0, 0b100, false, false, false); \r\n break;\r\n }\r\n DS3231_clock.turnOnAlarm(2);\r\n }\r\n delay(100);\r\n}\r\n\r\nvoid DS3231_doWhenWakeUp(){\r\n if(digitalRead(/*{pinDigit}*/)==LOW){\r\n DS3231_clock.turnOffAlarm(/*{alarm}*/);\r\n DS3231_setAlarm(/*{alarm}*/,/*{mode}*/);\r\n DS3231_i ++;\r\n if(DS3231_i == /*{i}*/){\r\n\r\n /*{$BRANCH1}*/ \r\n \r\n DS3231_i=0;\r\n\r\n }\r\n }\r\n}\r`, "_loop": `DS3231_doWhenWakeUp();` } } }, "handler": this.funcs.BLOCK_1656596600428 }, { "opcode": "BLOCK_1656597084419", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": { "numero": { "type": "fieldMenu", "defaultValue": "1", "menu": "BLOCK_1656596600428_ALARM" }, "jour": { "type": "number", "defaultValue": 5 }, "heure": { "type": "number", "defaultValue": 20 }, "minute": { "type": "number", "defaultValue": 30 } }, "branchCount": 0, "handler": this.funcs.BLOCK_1656597084419 } ]); export default blocks;PK }'VZ99!src/cates/cate_4b4990e1/blocks.jsconst blocks = (extFacePanels) => ([{ "opcode": "BLOCK_1656663686735", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": { "pinDigit": { "type": "fieldMenu", "defaultValue": "2", "menu": "BLOCK_1656663686735_PINDIGIT" } }, "branchCount": 0, "codes": { "arduinoc": { "code": `LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);`, "sections": { "include": [ "\"src/LowPower.h\"" ] } } }, "handler": this.funcs.BLOCK_1656663686735 }, { "opcode": "BLOCK_1656663686984", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "arguments": {}, "branchCount": 0, "codes": { "arduinoc": { "code": `LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);\r\n//Serial.println(\"reveil\");\r\n//delay(100);`, "sections": { "include": [ "\"src/LowPower.h\"" ] } } }, "handler": this.funcs.BLOCK_1656663686984 }, { "opcode": "BLOCK_1656663687195", "blockType": "number", "checkboxInFlyout": false, "gap": 12, "arguments": {}, "branchCount": 0, "codes": { "arduinoc": { "code": `(float((analogRead(analogInPin))*5)/1023*2)`, "sections": { "declare": `const int analogInPin = A0;` } } }, "handler": this.funcs.BLOCK_1656663687195 } ]); export default blocks;PK }'V src/langs/PK }'V&##src/langs/zh.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/de.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/es.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/fr.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/id.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/ja.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/ja-jph.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/ko.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/pl.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/uk.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/zh-hant.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/nl.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/it.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/hr.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/ru.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/pt.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/fi.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/tr.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/tk.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'V&##src/langs/en.jsexport default { "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" };PK }'Viisrc/langs/index.jsimport zh from './zh.js'; import de from './de.js'; import es from './es.js'; import fr from './fr.js'; import id from './id.js'; import ja from './ja.js'; import jaJph from './ja-jph.js'; import ko from './ko.js'; import pl from './pl.js'; import uk from './uk.js'; import zhHant from './zh-hant.js'; import nl from './nl.js'; import it from './it.js'; import hr from './hr.js'; import ru from './ru.js'; import pt from './pt.js'; import fi from './fi.js'; import tr from './tr.js'; import tk from './tk.js'; import en from './en.js'; const langs = { 'zh': zh, 'de': de, 'es': es, 'fr': fr, 'id': id, 'ja': ja, 'ja-jph': jaJph, 'ko': ko, 'pl': pl, 'uk': uk, 'zh-hant': zhHant, 'nl': nl, 'it': it, 'hr': hr, 'ru': ru, 'pt': pt, 'fi': fi, 'tr': tr, 'tk': tk, 'en': en }; export default langs;PK }'VG manifest.json{ "id": "vdr_df3231_lowpower", "iconURL": "vdr_df3231_lowpower/imgs/ada1254f8ef5432cac744dd9015fb502.jpeg", "coverURL": "./res/ada1254f8ef5432cac744dd9015fb502.jpeg", "name": { "zh": "vdr DF3231 LowPower", "de": "vdr DF3231 LowPower", "es": "vdr DF3231 LowPower", "fr": "vdr DF3231 LowPower", "id": "vdr DF3231 LowPower", "ja": "vdr DF3231 LowPower", "ja-jph": "vdr DF3231 LowPower", "ko": "vdr DF3231 LowPower", "pl": "vdr DF3231 LowPower", "uk": "vdr DF3231 LowPower", "zh-hant": "vdr DF3231 LowPower", "nl": "vdr DF3231 LowPower", "it": "vdr DF3231 LowPower", "hr": "vdr DF3231 LowPower", "ru": "vdr DF3231 LowPower", "pt": "vdr DF3231 LowPower", "fi": "vdr DF3231 LowPower", "tr": "vdr DF3231 LowPower", "tk": "vdr DF3231 LowPower", "en": "vdr DF3231 LowPower" }, "description": { "zh": "", "de": "", "es": "", "fr": "", "id": "", "ja": "", "ja-jph": "", "ko": "", "pl": "", "uk": "", "zh-hant": "", "nl": "", "it": "", "hr": "", "ru": "", "pt": "", "fi": "", "tr": "", "tk": "", "en": "" }, "targets": [ "arduino_mega2560", "arduino_uno" ], "main": "vdr_df3231_lowpower/index.js", "codeTypes": [ "arduinoc" ], "device": false, "sortId": 999, "version": "1.0.0", "extApiVersion": [ "1.0.3" ], "platform": [ "mblockpc" ], "homepage": "https://www.du-man.net", "feature": [ "worker" ] }PK }'V data.bak/PK }'V<<data.bak/ext.json{ "identify": "vdr_df3231_lowpower", "version": "1.0.0", "device": false, "template": "arduinoc", "cover": { "name": "DS3231.jpeg", "url": "https://mblock-expanded.oss-cn-shenzhen.aliyuncs.com/ada1254f8ef5432cac744dd9015fb502.jpeg" }, "codeTypes": [ "arduinoc" ], "generator": { "arduinoc": { "template": "// generated by mBlock5 for \n// codes make you happy\n\n//( include //)\n#include \n//( lib //)\n\n//({\n this.$ALL_VARIABLES.length==0?'':this.$ALL_VARIABLES.map(v=>\"float \"+v+\" = 0;\").join('\\\\n')\n}//)\n\n//( declare //)\n\n\nvoid _delay(float seconds) {\n long endTime = millis() + seconds * 1000;\n while(millis() < endTime) _loop();\n}\n\n//(\nvoid setup() {\n //( setup //)\n //( code //)\n}\n//)\n\nvoid _loop() {\n //( _loop //)\n}\n\nvoid loop() {\n _loop();\n}", "generator": "({\n lang: 'arduinoc',\n template: `<%=template%>`,\n splitor: {\n frame: {\n left: \"//(\",\n right: \"//)\",\n },\n expression: {\n left: \"/*{\",\n right: \"}*/\",\n }\n },\n reducers: [\n {\n name: 'include',\n reduce: (codes) => {\n let codes1 = []\n for (let code of codes) {\n let codeStr = '';\n if (typeof code === 'string') {\n codeStr = code;\n } else if (typeof code === 'function') {\n codeStr = code();\n }\n if (codes1.indexOf(codeStr) === -1) {\n codes1.push(codeStr);\n }\n }\n if (codes1.length === 0) {\n return undefined;\n }\n return codes1.map(code => {\n return '#include ' + code;\n }).join('\\n') + '\\n'\n }\n }\n ]\n})", "snippets": "", "sources": [ { "name": "src/DS3231.cpp", "url": "src/DS3231.cpp", "fileData": "/*\nDS3231.cpp: DS3231 Real-Time Clock library\nEric Ayars\n4/1/11\n\nSpliced in DateTime all-at-once reading (to avoid rollover) and unix time\nfrom Jean-Claude Wippler and Limor Fried\nAndy Wickert\n5/15/11\n\nFixed problem with SD processors(no function call) by replacing all occurences of the term PM, which\nis defined as a macro on SAMD controllers by PM_time. \nSimon Gassner\n11/28/2017\n\nFixed setting 12-hour clock in setHour function so that 12:xx AM is not stored as 00:xx and corrected \nthe setting of the PM flag for 12:xx PM. These address certain DS3231 errors in properly setting the \nAM/PM (bit 5) flag in the 02h register when passing from AM to PM and PM to AM.\nDavid Merrifield\n04/14/2020\n\nReleased into the public domain.\n*/\n\n#include \"DS3231.h\"\n\n// These included for the DateTime class inclusion; will try to find a way to\n// not need them in the future...\n#if defined(__AVR__)\n#include \n#elif defined(ESP8266)\n#include \n#endif\n// Changed the following to work on 1.0\n//#include \"WProgram.h\"\n#include \n\n\n#define CLOCK_ADDRESS 0x68\n\n#define SECONDS_FROM_1970_TO_2000 946684800\n\n\n// Constructor\nDS3231::DS3231() : _Wire(Wire) {\n\t// nothing to do for this constructor.\n}\n\nDS3231::DS3231(TwoWire & w) : _Wire(w) {\n}\n\n// Utilities from JeeLabs/Ladyada\n\n////////////////////////////////////////////////////////////////////////////////\n// utility code, some of this could be exposed in the DateTime API if needed\n\n// DS3231 is smart enough to know this, but keeping it for now so I don't have\n// to rewrite their code. -ADW\nstatic const uint8_t daysInMonth [] PROGMEM = { 31,28,31,30,31,30,31,31,30,31,30,31 };\n\n// number of days since 2000/01/01, valid for 2001..2099\nstatic uint16_t date2days(uint16_t y, uint8_t m, uint8_t d) {\n if (y >= 2000)\n y -= 2000;\n uint16_t days = d;\n for (uint8_t i = 1; i < m; ++i)\n days += pgm_read_byte(daysInMonth + i - 1);\n if (m > 2 && isleapYear(y))\n ++days;\n return days + 365 * y + (y + 3) / 4 - 1;\n}\n\nstatic long time2long(uint16_t days, uint8_t h, uint8_t m, uint8_t s) {\n return ((days * 24L + h) * 60 + m) * 60 + s;\n}\n\n/***************************************** \n\tPublic Functions\n *****************************************/\n\n/*******************************************************************************\n * TO GET ALL DATE/TIME INFORMATION AT ONCE AND AVOID THE CHANCE OF ROLLOVER\n * DateTime implementation spliced in here from Jean-Claude Wippler's (JeeLabs)\n * RTClib, as modified by Limor Fried (Ladyada); source code at:\n * https://github.com/adafruit/RTClib\n ******************************************************************************/\n\n////////////////////////////////////////////////////////////////////////////////\n// DateTime implementation - ignores time zones and DST changes\n// NOTE: also ignores leap seconds, see http://en.wikipedia.org/wiki/Leap_second\n\nDateTime::DateTime (uint32_t t) {\n t -= SECONDS_FROM_1970_TO_2000; // bring to 2000 timestamp from 1970\n\n ss = t % 60;\n t /= 60;\n mm = t % 60;\n t /= 60;\n hh = t % 24;\n uint16_t days = t / 24;\n uint8_t leap;\n for (yOff = 0; ; ++yOff) {\n leap = isleapYear(yOff);\n if (days < 365 + leap)\n break;\n days -= 365 + leap;\n }\n for (m = 1; ; ++m) {\n uint8_t daysPerMonth = pgm_read_byte(daysInMonth + m - 1);\n if (leap && m == 2)\n ++daysPerMonth;\n if (days < daysPerMonth)\n break;\n days -= daysPerMonth;\n }\n d = days + 1;\n}\n\nDateTime::DateTime (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec) {\n if (year >= 2000)\n year -= 2000;\n yOff = year;\n m = month;\n d = day;\n hh = hour;\n mm = min;\n ss = sec;\n}\n\n// supported formats are date \"Mmm dd yyyy\" and time \"hh:mm:ss\" (same as __DATE__ and __TIME__)\nDateTime::DateTime(const char* date, const char* time) {\n static const char month_names[] = \"JanFebMarAprMayJunJulAugSepOctNovDec\";\n static char buff[4] = {'0','0','0','0'};\n int y;\n sscanf(date, \"%s %c %d\", buff, &d, &y);\n yOff = y >= 2000 ? y - 2000 : y;\n m = (strstr(month_names, buff) - month_names) / 3 + 1;\n sscanf(time, \"%c:%c:%c\", &hh, &mm, &ss);\n}\n\n// UNIX time: IS CORRECT ONLY WHEN SET TO UTC!!!\nuint32_t DateTime::unixtime(void) const {\n uint32_t t;\n uint16_t days = date2days(yOff, m, d);\n t = time2long(days, hh, mm, ss);\n t += SECONDS_FROM_1970_TO_2000; // seconds from 1970 to 2000\n\n return t;\n}\n\n// Slightly modified from JeeLabs / Ladyada\n// Get all date/time at once to avoid rollover (e.g., minute/second don't match)\nstatic uint8_t bcd2bin (uint8_t val) { return val - 6 * (val >> 4); }\n// Commented to avoid compiler warnings, but keeping in case we want this\n// eventually\n//static uint8_t bin2bcd (uint8_t val) { return val + 6 * (val / 10); }\n\nbool isleapYear(const uint8_t y) {\n if(y&3)//check if divisible by 4\n return false;\n //only check other, when first failed\n return (y % 100 || y % 400 == 0);\n}\n\nDateTime RTClib::now(TwoWire & _Wire) {\n _Wire.beginTransmission(CLOCK_ADDRESS);\n _Wire.write(0);\t// This is the first register address (Seconds)\n \t\t\t// We'll read from here on for 7 bytes: secs reg, minutes reg, hours, days, months and years.\n _Wire.endTransmission();\n \n _Wire.requestFrom(CLOCK_ADDRESS, 7);\n uint16_t ss = bcd2bin(_Wire.read() & 0x7F);\n uint16_t mm = bcd2bin(_Wire.read());\n uint16_t hh = bcd2bin(_Wire.read());\n _Wire.read();\n uint16_t d = bcd2bin(_Wire.read());\n uint16_t m = bcd2bin(_Wire.read());\n uint16_t y = bcd2bin(_Wire.read()) + 2000;\n \n return DateTime (y, m, d, hh, mm, ss);\n}\n\n///// ERIC'S ORIGINAL CODE FOLLOWS /////\n\nbyte DS3231::getSecond() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x00);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\nbyte DS3231::getMinute() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x01);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\nbyte DS3231::getHour(bool& h12, bool& PM_time) {\n\tbyte temp_buffer;\n\tbyte hour;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\ttemp_buffer = _Wire.read();\n\th12 = temp_buffer & 0b01000000;\n\tif (h12) {\n\t\tPM_time = temp_buffer & 0b00100000;\n\t\thour = bcdToDec(temp_buffer & 0b00011111);\n\t} else {\n\t\thour = bcdToDec(temp_buffer & 0b00111111);\n\t}\n\treturn hour;\n}\n\nbyte DS3231::getDoW() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x03);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\nbyte DS3231::getDate() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x04);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\nbyte DS3231::getMonth(bool& Century) {\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x05);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\ttemp_buffer = _Wire.read();\n\tCentury = temp_buffer & 0b10000000;\n\treturn (bcdToDec(temp_buffer & 0b01111111)) ;\n}\n\nbyte DS3231::getYear() {\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x06);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn bcdToDec(_Wire.read());\n}\n\n// setEpoch function gives the epoch as parameter and feeds the RTC\n// epoch = UnixTime and starts at 01.01.1970 00:00:00\nvoid DS3231::setEpoch(time_t epoch, bool flag_localtime) {\n\tstruct tm tmnow;\n\tif (flag_localtime) {\n\t\tlocaltime_r(&epoch, &tmnow);\n\t}\n\telse {\n\t\tgmtime_r(&epoch, &tmnow);\n\t}\n\tsetSecond(tmnow.tm_sec);\n\tsetMinute(tmnow.tm_min);\n\tsetHour(tmnow.tm_hour);\n\tsetDoW(tmnow.tm_wday + 1);\n\tsetDate(tmnow.tm_mday);\n\tsetMonth(tmnow.tm_mon + 1);\n\tsetYear(tmnow.tm_year - 100);\n}\n\nvoid DS3231::setSecond(byte Second) {\n\t// Sets the seconds \n\t// This function also resets the Oscillator Stop Flag, which is set\n\t// whenever power is interrupted.\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x00);\n\t_Wire.write(decToBcd(Second));\t\n\t_Wire.endTransmission();\n\t// Clear OSF flag\n\tbyte temp_buffer = readControlByte(1);\n\twriteControlByte((temp_buffer & 0b01111111), 1);\n}\n\nvoid DS3231::setMinute(byte Minute) {\n\t// Sets the minutes \n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x01);\n\t_Wire.write(decToBcd(Minute));\t\n\t_Wire.endTransmission();\n}\n\n// Following setHour revision by David Merrifield 4/14/2020 correcting handling of 12-hour clock\n\nvoid DS3231::setHour(byte Hour) {\n\t// Sets the hour, without changing 12/24h mode.\n\t// The hour must be in 24h format.\n\n\tbool h12;\n\tbyte temp_hour;\n\n\t// Start by figuring out what the 12/24 mode is\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.endTransmission();\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\th12 = (_Wire.read() & 0b01000000);\n\t// if h12 is true, it's 12h mode; false is 24h.\n\n\tif (h12) {\n\t\t// 12 hour\n\t\tbool am_pm = (Hour > 11);\n\t\ttemp_hour = Hour;\n\t\tif (temp_hour > 11) {\n\t\t\ttemp_hour = temp_hour - 12;\n\t\t}\n\t\tif (temp_hour == 0) {\n\t\t\ttemp_hour = 12;\n\t\t}\n\t\ttemp_hour = decToBcd(temp_hour) | (am_pm << 5) | 0b01000000;\n\t} else {\n\t\t// 24 hour\n\t\ttemp_hour = decToBcd(Hour) & 0b10111111;\n\t}\n\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.write(temp_hour);\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setDoW(byte DoW) {\n\t// Sets the Day of Week\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x03);\n\t_Wire.write(decToBcd(DoW));\t\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setDate(byte Date) {\n\t// Sets the Date\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x04);\n\t_Wire.write(decToBcd(Date));\t\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setMonth(byte Month) {\n\t// Sets the month\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x05);\n\t_Wire.write(decToBcd(Month));\t\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setYear(byte Year) {\n\t// Sets the year\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x06);\n\t_Wire.write(decToBcd(Year));\t\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setClockMode(bool h12) {\n\t// sets the mode to 12-hour (true) or 24-hour (false).\n\t// One thing that bothers me about how I've written this is that\n\t// if the read and right happen at the right hourly millisecnd,\n\t// the clock will be set back an hour. Not sure how to do it better, \n\t// though, and as long as one doesn't set the mode frequently it's\n\t// a very minimal risk. \n\t// It's zero risk if you call this BEFORE setting the hour, since\n\t// the setHour() function doesn't change this mode.\n\t\n\tbyte temp_buffer;\n\n\t// Start by reading byte 0x02.\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.endTransmission();\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\ttemp_buffer = _Wire.read();\n\n\t// Set the flag to the requested value:\n\tif (h12) {\n\t\ttemp_buffer = temp_buffer | 0b01000000;\n\t} else {\n\t\ttemp_buffer = temp_buffer & 0b10111111;\n\t}\n\n\t// Write the byte\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x02);\n\t_Wire.write(temp_buffer);\n\t_Wire.endTransmission();\n}\n\nfloat DS3231::getTemperature() {\n\t// Checks the internal thermometer on the DS3231 and returns the \n\t// temperature as a floating-point value.\n\n // Updated / modified a tiny bit from \"Coding Badly\" and \"Tri-Again\"\n // http://forum.arduino.cc/index.php/topic,22301.0.html\n \n byte tMSB, tLSB;\n float temp3231;\n \n // temp registers (11h-12h) get updated automatically every 64s\n _Wire.beginTransmission(CLOCK_ADDRESS);\n _Wire.write(0x11);\n _Wire.endTransmission();\n _Wire.requestFrom(CLOCK_ADDRESS, 2);\n\n // Should I do more \"if available\" checks here?\n if(_Wire.available()) {\n tMSB = _Wire.read(); //2's complement int portion\n tLSB = _Wire.read(); //fraction portion\n\n int16_t itemp = ( tMSB << 8 | (tLSB & 0xC0) ); // Shift upper byte, add lower\n temp3231 = ( (float)itemp / 256.0 ); // Scale and return\n }\n else {\n temp3231 = -9999; // Impossible temperature; error value\n }\n \n return temp3231;\n}\n\nvoid DS3231::getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM) {\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x07);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 4);\n\n\ttemp_buffer\t= _Wire.read();\t// Get A1M1 and A1 Seconds\n\tA1Second\t= bcdToDec(temp_buffer & 0b01111111);\n\t// put A1M1 bit in position 0 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>7;\n\n\ttemp_buffer\t\t= _Wire.read();\t// Get A1M2 and A1 minutes\n\tA1Minute\t= bcdToDec(temp_buffer & 0b01111111);\n\t// put A1M2 bit in position 1 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>6;\n\n\ttemp_buffer\t= _Wire.read();\t// Get A1M3 and A1 Hour\n\t// put A1M3 bit in position 2 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>5;\n\t// determine A1 12/24 mode\n\tA1h12\t\t= temp_buffer & 0b01000000;\n\tif (A1h12) {\n\t\tA1PM\t= temp_buffer & 0b00100000;\t\t\t// determine am/pm\n\t\tA1Hour\t= bcdToDec(temp_buffer & 0b00011111);\t// 12-hour\n\t} else {\n\t\tA1Hour\t= bcdToDec(temp_buffer & 0b00111111);\t// 24-hour\n\t}\n\n\ttemp_buffer\t= _Wire.read();\t// Get A1M4 and A1 Day/Date\n\t// put A1M3 bit in position 3 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>4;\n\t// determine A1 day or date flag\n\tA1Dy\t\t= (temp_buffer & 0b01000000)>>6;\n\tif (A1Dy) {\n\t\t// alarm is by day of week, not date.\n\t\tA1Day\t= bcdToDec(temp_buffer & 0b00001111);\n\t} else {\n\t\t// alarm is by date, not day of week.\n\t\tA1Day\t= bcdToDec(temp_buffer & 0b00111111);\n\t}\n}\n\nvoid DS3231::getA2Time(byte& A2Day, byte& A2Hour, byte& A2Minute, byte& AlarmBits, bool& A2Dy, bool& A2h12, bool& A2PM) {\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x0b);\n\t_Wire.endTransmission();\n\n\t_Wire.requestFrom(CLOCK_ADDRESS, 3); \n\ttemp_buffer\t= _Wire.read();\t// Get A2M2 and A2 Minutes\n\tA2Minute\t= bcdToDec(temp_buffer & 0b01111111);\n\t// put A2M2 bit in position 4 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>3;\n\n\ttemp_buffer\t= _Wire.read();\t// Get A2M3 and A2 Hour\n\t// put A2M3 bit in position 5 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>2;\n\t// determine A2 12/24 mode\n\tA2h12\t\t= temp_buffer & 0b01000000;\n\tif (A2h12) {\n\t\tA2PM\t= temp_buffer & 0b00100000;\t\t\t// determine am/pm\n\t\tA2Hour\t= bcdToDec(temp_buffer & 0b00011111);\t// 12-hour\n\t} else {\n\t\tA2Hour\t= bcdToDec(temp_buffer & 0b00111111);\t// 24-hour\n\t}\n\n\ttemp_buffer\t= _Wire.read();\t// Get A2M4 and A1 Day/Date\n\t// put A2M4 bit in position 6 of DS3231_AlarmBits.\n\tAlarmBits\t= AlarmBits | (temp_buffer & 0b10000000)>>1;\n\t// determine A2 day or date flag\n\tA2Dy\t\t= (temp_buffer & 0b01000000)>>6;\n\tif (A2Dy) {\n\t\t// alarm is by day of week, not date.\n\t\tA2Day\t= bcdToDec(temp_buffer & 0b00001111);\n\t} else {\n\t\t// alarm is by date, not day of week.\n\t\tA2Day\t= bcdToDec(temp_buffer & 0b00111111);\n\t}\n}\n\nvoid DS3231::setA1Time(byte A1Day, byte A1Hour, byte A1Minute, byte A1Second, byte AlarmBits, bool A1Dy, bool A1h12, bool A1PM) {\n\t//\tSets the alarm-1 date and time on the DS3231, using A1* information\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x07);\t// A1 starts at 07h\n\t// Send A1 second and A1M1\n\t_Wire.write(decToBcd(A1Second) | ((AlarmBits & 0b00000001) << 7));\n\t// Send A1 Minute and A1M2\n\t_Wire.write(decToBcd(A1Minute) | ((AlarmBits & 0b00000010) << 6));\n\t// Figure out A1 hour \n\tif (A1h12) {\n\t\t// Start by converting existing time to h12 if it was given in 24h.\n\t\tif (A1Hour > 12) {\n\t\t\t// well, then, this obviously isn't a h12 time, is it?\n\t\t\tA1Hour = A1Hour - 12;\n\t\t\tA1PM = true;\n\t\t}\n\t\tif (A1PM) {\n\t\t\t// Afternoon\n\t\t\t// Convert the hour to BCD and add appropriate flags.\n\t\t\ttemp_buffer = decToBcd(A1Hour) | 0b01100000;\n\t\t} else {\n\t\t\t// Morning\n\t\t\t// Convert the hour to BCD and add appropriate flags.\n\t\t\ttemp_buffer = decToBcd(A1Hour) | 0b01000000;\n\t\t}\n\t} else {\n\t\t// Now for 24h\n\t\ttemp_buffer = decToBcd(A1Hour); \n\t}\n\ttemp_buffer = temp_buffer | ((AlarmBits & 0b00000100)<<5);\n\t// A1 hour is figured out, send it\n\t_Wire.write(temp_buffer); \n\t// Figure out A1 day/date and A1M4\n\ttemp_buffer = ((AlarmBits & 0b00001000)<<4) | decToBcd(A1Day);\n\tif (A1Dy) {\n\t\t// Set A1 Day/Date flag (Otherwise it's zero)\n\t\ttemp_buffer = temp_buffer | 0b01000000;\n\t}\n\t_Wire.write(temp_buffer);\n\t// All done!\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::setA2Time(byte A2Day, byte A2Hour, byte A2Minute, byte AlarmBits, bool A2Dy, bool A2h12, bool A2PM) {\n\t//\tSets the alarm-2 date and time on the DS3231, using A2* information\n\tbyte temp_buffer;\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\t_Wire.write(0x0b);\t// A1 starts at 0bh\n\t// Send A2 Minute and A2M2\n\t_Wire.write(decToBcd(A2Minute) | ((AlarmBits & 0b00010000) << 3));\n\t// Figure out A2 hour \n\tif (A2h12) {\n\t\t// Start by converting existing time to h12 if it was given in 24h.\n\t\tif (A2Hour > 12) {\n\t\t\t// well, then, this obviously isn't a h12 time, is it?\n\t\t\tA2Hour = A2Hour - 12;\n\t\t\tA2PM = true;\n\t\t}\n\t\tif (A2PM) {\n\t\t\t// Afternoon\n\t\t\t// Convert the hour to BCD and add appropriate flags.\n\t\t\ttemp_buffer = decToBcd(A2Hour) | 0b01100000;\n\t\t} else {\n\t\t\t// Morning\n\t\t\t// Convert the hour to BCD and add appropriate flags.\n\t\t\ttemp_buffer = decToBcd(A2Hour) | 0b01000000;\n\t\t}\n\t} else {\n\t\t// Now for 24h\n\t\ttemp_buffer = decToBcd(A2Hour); \n\t}\n\t// add in A2M3 bit\n\ttemp_buffer = temp_buffer | ((AlarmBits & 0b00100000)<<2);\n\t// A2 hour is figured out, send it\n\t_Wire.write(temp_buffer); \n\t// Figure out A2 day/date and A2M4\n\ttemp_buffer = ((AlarmBits & 0b01000000)<<1) | decToBcd(A2Day);\n\tif (A2Dy) {\n\t\t// Set A2 Day/Date flag (Otherwise it's zero)\n\t\ttemp_buffer = temp_buffer | 0b01000000;\n\t}\n\t_Wire.write(temp_buffer);\n\t// All done!\n\t_Wire.endTransmission();\n}\n\nvoid DS3231::turnOnAlarm(byte Alarm) {\n\t// turns on alarm number \"Alarm\". Defaults to 2 if Alarm is not 1.\n\tbyte temp_buffer = readControlByte(0);\n\t// modify control byte\n\tif (Alarm == 1) {\n\t\ttemp_buffer = temp_buffer | 0b00000101;\n\t} else {\n\t\ttemp_buffer = temp_buffer | 0b00000110;\n\t}\n\twriteControlByte(temp_buffer, 0);\n}\n\nvoid DS3231::turnOffAlarm(byte Alarm) {\n\t// turns off alarm number \"Alarm\". Defaults to 2 if Alarm is not 1.\n\t// Leaves interrupt pin alone.\n\tbyte temp_buffer = readControlByte(0);\n\t// modify control byte\n\tif (Alarm == 1) {\n\t\ttemp_buffer = temp_buffer & 0b11111110;\n\t} else {\n\t\ttemp_buffer = temp_buffer & 0b11111101;\n\t}\n\twriteControlByte(temp_buffer, 1);\n}\n\nbool DS3231::checkAlarmEnabled(byte Alarm) {\n\t// Checks whether the given alarm is enabled.\n\tbyte result = 0x0;\n\tbyte temp_buffer = readControlByte(0);\n\tif (Alarm == 1) {\n\t\tresult = temp_buffer & 0b00000001;\n\t} else {\n\t\tresult = temp_buffer & 0b00000010;\n\t}\n\treturn result;\n}\n\nbool DS3231::checkIfAlarm(byte Alarm) {\n\t// Checks whether alarm 1 or alarm 2 flag is on, returns T/F accordingly.\n\t// Turns flag off, also.\n\t// defaults to checking alarm 2, unless Alarm == 1.\n\tbyte result;\n\tbyte temp_buffer = readControlByte(1);\n\tif (Alarm == 1) {\n\t\t// Did alarm 1 go off?\n\t\tresult = temp_buffer & 0b00000001;\n\t\t// clear flag\n\t\ttemp_buffer = temp_buffer & 0b11111110;\n\t} else {\n\t\t// Did alarm 2 go off?\n\t\tresult = temp_buffer & 0b00000010;\n\t\t// clear flag\n\t\ttemp_buffer = temp_buffer & 0b11111101;\n\t}\n\twriteControlByte(temp_buffer, 1);\n\treturn result;\n}\n\nvoid DS3231::enableOscillator(bool TF, bool battery, byte frequency) {\n\t// turns oscillator on or off. True is on, false is off.\n\t// if battery is true, turns on even for battery-only operation,\n\t// otherwise turns off if Vcc is off.\n\t// frequency must be 0, 1, 2, or 3.\n\t// 0 = 1 Hz\n\t// 1 = 1.024 kHz\n\t// 2 = 4.096 kHz\n\t// 3 = 8.192 kHz (Default if frequency byte is out of range)\n\tif (frequency > 3) frequency = 3;\n\t// read control byte in, but zero out current state of RS2 and RS1.\n\tbyte temp_buffer = readControlByte(0) & 0b11100111;\n\tif (battery) {\n\t\t// turn on BBSQW flag\n\t\ttemp_buffer = temp_buffer | 0b01000000;\n\t} else {\n\t\t// turn off BBSQW flag\n\t\ttemp_buffer = temp_buffer & 0b10111111;\n\t}\n\tif (TF) {\n\t\t// set ~EOSC to 0 and INTCN to zero.\n\t\ttemp_buffer = temp_buffer & 0b01111011;\n\t} else {\n\t\t// set ~EOSC to 1, leave INTCN as is.\n\t\ttemp_buffer = temp_buffer | 0b10000000;\n\t}\n\t// shift frequency into bits 3 and 4 and set.\n\tfrequency = frequency << 3;\n\ttemp_buffer = temp_buffer | frequency;\n\t// And write the control bits\n\twriteControlByte(temp_buffer, 0);\n}\n\nvoid DS3231::enable32kHz(bool TF) {\n\t// turn 32kHz pin on or off\n\tbyte temp_buffer = readControlByte(1);\n\tif (TF) {\n\t\t// turn on 32kHz pin\n\t\ttemp_buffer = temp_buffer | 0b00001000;\n\t} else {\n\t\t// turn off 32kHz pin\n\t\ttemp_buffer = temp_buffer & 0b11110111;\n\t}\n\twriteControlByte(temp_buffer, 1);\n}\n\nbool DS3231::oscillatorCheck() {\n\t// Returns false if the oscillator has been off for some reason.\n\t// If this is the case, the time is probably not correct.\n\tbyte temp_buffer = readControlByte(1);\n\tbool result = true;\n\tif (temp_buffer & 0b10000000) {\n\t\t// Oscillator Stop Flag (OSF) is set, so return false.\n\t\tresult = false;\n\t}\n\treturn result;\n}\n\n/***************************************** \n\tPrivate Functions\n *****************************************/\n\nbyte DS3231::decToBcd(byte val) {\n// Convert normal decimal numbers to binary coded decimal\n\treturn ( (val/10*16) + (val%10) );\n}\n\nbyte DS3231::bcdToDec(byte val) {\n// Convert binary coded decimal to normal decimal numbers\n\treturn ( (val/16*10) + (val%16) );\n}\n\nbyte DS3231::readControlByte(bool which) {\n\t// Read selected control byte\n\t// first byte (0) is 0x0e, second (1) is 0x0f\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\tif (which) {\n\t\t// second control byte\n\t\t_Wire.write(0x0f);\n\t} else {\n\t\t// first control byte\n\t\t_Wire.write(0x0e);\n\t}\n\t_Wire.endTransmission();\n\t_Wire.requestFrom(CLOCK_ADDRESS, 1);\n\treturn _Wire.read();\t\n}\n\nvoid DS3231::writeControlByte(byte control, bool which) {\n\t// Write the selected control byte.\n\t// which=false -> 0x0e, true->0x0f.\n\t_Wire.beginTransmission(CLOCK_ADDRESS);\n\tif (which) {\n\t\t_Wire.write(0x0f);\n\t} else {\n\t\t_Wire.write(0x0e);\n\t}\n\t_Wire.write(control);\n\t_Wire.endTransmission();\n}\n\n" }, { "name": "src/DS3231.h", "url": "src/DS3231.h", "fileData": "/*\n * DS3231.h\n *\n * Arduino Library for the DS3231 Real-Time Clock chip\n *\n * (c) Eric Ayars\n * 4/1/11\n * released into the public domain. If you use this, please let me know\n * (just out of pure curiosity!) by sending me an email:\n * eric@ayars.org\n *\n */\n\n// Modified by Andy Wickert 5/15/11: Spliced in stuff from RTClib\n// Modified by Simon Gassner 11/28/2017: Changed Term \"PM\" to \"PM_time\" for compability with SAMD Processors\n#ifndef DS3231_h\n#define DS3231_h\n\n// Changed the following to work on 1.0\n//#include \"WProgram.h\"\n#include \n#include \n#include \n\n// DateTime (get everything at once) from JeeLabs / Adafruit\n// Simple general-purpose date/time class (no TZ / DST / leap second handling!)\nclass DateTime {\npublic:\n DateTime (uint32_t t =0);\n DateTime (uint16_t year, uint8_t month, uint8_t day,\n uint8_t hour =0, uint8_t min =0, uint8_t sec =0);\n DateTime (const char* date, const char* time);\n uint16_t year() const { return 2000 + yOff; }\n uint8_t month() const { return m; }\n uint8_t day() const { return d; }\n uint8_t hour() const { return hh; }\n uint8_t minute() const { return mm; }\n uint8_t second() const { return ss; }\n uint8_t dayOfTheWeek() const;\n\n // 32-bit times as seconds since 1/1/2000\n long secondstime() const;\n // 32-bit times as seconds since 1/1/1970\n // THE ABOVE COMMENT IS CORRECT FOR LOCAL TIME; TO USE THIS COMMAND TO\n // OBTAIN TRUE UNIX TIME SINCE EPOCH, YOU MUST CALL THIS COMMAND AFTER\n // SETTING YOUR CLOCK TO UTC\n uint32_t unixtime(void) const;\nprotected:\n uint8_t yOff, m, d, hh, mm, ss;\n};\n\n//checks if a year is a leap year\nbool isleapYear(const uint8_t);\n\nclass RTClib {\n public:\n\t\t// Get date and time snapshot\n static DateTime now(TwoWire & _Wire = Wire);\n};\n\n// Eric's original code is everything below this line\nclass DS3231 {\n\tpublic:\n\t\t\t\n\t\t//Constructor\n\t\tDS3231();\n\t\tDS3231(TwoWire & w);\n\n\t\tTwoWire & _Wire;\n\n\t\t// Time-retrieval functions\n \n\t\t// the get*() functions retrieve current values of the registers.\n\t\tbyte getSecond(); \n\t\tbyte getMinute(); \n\t\tbyte getHour(bool& h12, bool& PM_time); \n\t\t\t// In addition to returning the hour register, this function\n\t\t\t// returns the values of the 12/24-hour flag and the AM/PM flag.\n\t\tbyte getDoW(); \n\t\tbyte getDate(); \n\t\tbyte getMonth(bool& Century); \n\t\t\t// Also sets the flag indicating century roll-over.\n\t\tbyte getYear(); \n\t\t\t// Last 2 digits only\n\n\t\t// Time-setting functions\n\t\t// Note that none of these check for sensibility: You can set the\n\t\t// date to July 42nd and strange things will probably result.\n\t\t\n\t\t// set epoch function gives the epoch as parameter and feeds the RTC\n\t\t// epoch = UnixTime and starts at 01.01.1970 00:00:00\n\t\tvoid setEpoch(time_t epoch = 0, bool flag_localtime = false);\n\n\t\tvoid setSecond(byte Second); \n\t\t\t// In addition to setting the seconds, this clears the \n\t\t\t// \"Oscillator Stop Flag\".\n\t\tvoid setMinute(byte Minute); \n\t\t\t// Sets the minute\n\t\tvoid setHour(byte Hour); \n\t\t\t// Sets the hour\n\t\tvoid setDoW(byte DoW); \n\t\t\t// Sets the Day of the Week (1-7);\n\t\tvoid setDate(byte Date); \n\t\t\t// Sets the Date of the Month\n\t\tvoid setMonth(byte Month); \n\t\t\t// Sets the Month of the year\n\t\tvoid setYear(byte Year); \n\t\t\t// Last two digits of the year\n\t\tvoid setClockMode(bool h12); \n\t\t\t// Set 12/24h mode. True is 12-h, false is 24-hour.\n\n\t\t// Temperature function\n\n\t\tfloat getTemperature(); \n\n\t\t// Alarm functions\n\t\t\n\t\tvoid getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM); \n/* Retrieves everything you could want to know about alarm\n * one. \n * A1Dy true makes the alarm go on A1Day = Day of Week,\n * A1Dy false makes the alarm go on A1Day = Date of month.\n *\n * byte AlarmBits sets the behavior of the alarms:\n *\tDy\tA1M4\tA1M3\tA1M2\tA1M1\tRate\n *\tX\t1\t\t1\t\t1\t\t1\t\tOnce per second\n *\tX\t1\t\t1\t\t1\t\t0\t\tAlarm when seconds match\n *\tX\t1\t\t1\t\t0\t\t0\t\tAlarm when min, sec match\n *\tX\t1\t\t0\t\t0\t\t0\t\tAlarm when hour, min, sec match\n *\t0\t0\t\t0\t\t0\t\t0\t\tAlarm when date, h, m, s match\n *\t1\t0\t\t0\t\t0\t\t0\t\tAlarm when DoW, h, m, s match\n *\n *\tDy\tA2M4\tA2M3\tA2M2\tRate\n *\tX\t1\t\t1\t\t1\t\tOnce per minute (at seconds = 00)\n *\tX\t1\t\t1\t\t0\t\tAlarm when minutes match\n *\tX\t1\t\t0\t\t0\t\tAlarm when hours and minutes match\n *\t0\t0\t\t0\t\t0\t\tAlarm when date, hour, min match\n *\t1\t0\t\t0\t\t0\t\tAlarm when DoW, hour, min match\n */\n\t\tvoid getA2Time(byte& A2Day, byte& A2Hour, byte& A2Minute, byte& AlarmBits, bool& A2Dy, bool& A2h12, bool& A2PM); \n\t\t\t// Same as getA1Time();, but A2 only goes on seconds == 00.\n\t\tvoid setA1Time(byte A1Day, byte A1Hour, byte A1Minute, byte A1Second, byte AlarmBits, bool A1Dy, bool A1h12, bool A1PM); \n\t\t\t// Set the details for Alarm 1\n\t\tvoid setA2Time(byte A2Day, byte A2Hour, byte A2Minute, byte AlarmBits, bool A2Dy, bool A2h12, bool A2PM); \n\t\t\t// Set the details for Alarm 2\n\t\tvoid turnOnAlarm(byte Alarm); \n\t\t\t// Enables alarm 1 or 2 and the external interrupt pin.\n\t\t\t// If Alarm != 1, it assumes Alarm == 2.\n\t\tvoid turnOffAlarm(byte Alarm); \n\t\t\t// Disables alarm 1 or 2 (default is 2 if Alarm != 1);\n\t\t\t// and leaves the interrupt pin alone.\n\t\tbool checkAlarmEnabled(byte Alarm); \n\t\t\t// Returns T/F to indicate whether the requested alarm is\n\t\t\t// enabled. Defaults to 2 if Alarm != 1.\n\t\tbool checkIfAlarm(byte Alarm); \n\t\t\t// Checks whether the indicated alarm (1 or 2, 2 default);\n\t\t\t// has been activated.\n\n\t\t// Oscillator functions\n\n\t\tvoid enableOscillator(bool TF, bool battery, byte frequency); \n\t\t\t// turns oscillator on or off. True is on, false is off.\n\t\t\t// if battery is true, turns on even for battery-only operation,\n\t\t\t// otherwise turns off if Vcc is off.\n\t\t\t// frequency must be 0, 1, 2, or 3.\n\t\t\t// 0 = 1 Hz\n\t\t\t// 1 = 1.024 kHz\n\t\t\t// 2 = 4.096 kHz\n\t\t\t// 3 = 8.192 kHz (Default if frequency byte is out of range);\n\t\tvoid enable32kHz(bool TF); \n\t\t\t// Turns the 32kHz output pin on (true); or off (false).\n\t\tbool oscillatorCheck();;\n\t\t\t// Checks the status of the OSF (Oscillator Stop Flag);.\n\t\t\t// If this returns false, then the clock is probably not\n\t\t\t// giving you the correct time.\n\t\t\t// The OSF is cleared by function setSecond();.\n\n\tprivate:\n\n\t\tbyte decToBcd(byte val); \n\t\t\t// Convert normal decimal numbers to binary coded decimal\n\t\tbyte bcdToDec(byte val); \n\t\t\t// Convert binary coded decimal to normal decimal numbers\n\n\tprotected:\n\n\t\tbyte readControlByte(bool which); \n\t\t\t// Read selected control byte: (0); reads 0x0e, (1) reads 0x0f\n\t\tvoid writeControlByte(byte control, bool which); \n\t\t\t// Write the selected control byte. \n\t\t\t// which == false -> 0x0e, true->0x0f.\n\n};\n\n#endif\n" }, { "name": "src/LowPower.cpp", "url": "src/LowPower.cpp", "fileData": "/*******************************************************************************\n* LowPower Library\n* Version: 1.81\n* Date: 21-01-2020\n* Author: Lim Phang Moh\n* Company: Rocket Scream Electronics\n* Website: www.rocketscream.com\n*\n* This is a lightweight low power library for Arduino.\n*\n* This library is licensed under Creative Commons Attribution-ShareAlike 3.0\n* Unported License.\n*\n* Revision Description\n* ======== ===========\n* 1.81 Fixed timer 2 settings incorrectly restored after sleep.\n* Contributed by rwared11.\n* 1.80 Added support for ATmega88 and ATmega168P. PowerExtStandby()\n* modified because not supported on Atmega88 / Atmega168\n* Contributed by mrguen.\n* 1.70 Added support for ATmega644P and ATmega1284P.\n* Contributed by alexreinert.\n* 1.60 Added support for ATmega256RFR2. Contributed by Rodmg.\n* 1.50 Fixed compiler optimization (Arduino IDE 1.6.x branch) on BOD enable\n* function that causes the function to be over optimized.\n* 1.40\t\tAdded support for ATSAMD21G18A.\n* \t\t\tLibrary format compliant with Arduino IDE 1.5.x.\n* 1.30\t\tAdded support for ATMega168, ATMega2560, ATMega1280 & ATMega32U4.\n*\t\t\tTested to work with Arduino IDE 1.0.1 - 1.0.4.\n* 1.20\t\tRemove typo error in idle method for checking whether Timer 0 was\n*\t\t\tturned off.\n*\t\t\tRemove dependecy on WProgram.h which is not required.\n*\t\t\tTested to work with Arduino IDE 1.0.\n* 1.10\t\tAdded #ifndef for sleep_bod_disable() for compatibility with future\n*\t\t\tArduino IDE release.\n* 1.00 Initial public release.\n*******************************************************************************/\n#if defined (__AVR__)\n\t#include \n\t#include \n\t#include \n\t#include \n#elif defined (__arm__)\n\n#else\n\t#error \"Processor architecture is not supported.\"\n#endif\n\n#include \"LowPower.h\"\n\n#if defined (__AVR__)\n// Only Pico Power devices can change BOD settings through software\n#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__)\n#ifndef sleep_bod_disable\n#define sleep_bod_disable() \t\t\t\t\t\t\t\t\t\t\\\ndo { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n unsigned char tempreg; \t\t\t\t\t\t\t\t\t\t\t\t\t\\\n __asm__ __volatile__(\"in %[tempreg], %[mcucr]\" \"\\n\\t\" \t\t\t\\\n \"ori %[tempreg], %[bods_bodse]\" \"\\n\\t\" \t\t\\\n \"out %[mcucr], %[tempreg]\" \"\\n\\t\" \t\t\t\\\n \"andi %[tempreg], %[not_bodse]\" \"\\n\\t\" \t\t\\\n \"out %[mcucr], %[tempreg]\" \t\t\t\t\t\\\n : [tempreg] \"=&d\" (tempreg) \t\t\t\t\t\\\n : [mcucr] \"I\" _SFR_IO_ADDR(MCUCR), \t\t\t\\\n [bods_bodse] \"i\" (_BV(BODS) | _BV(BODSE)), \\\n [not_bodse] \"i\" (~_BV(BODSE))); \t\t\t\\\n} while (0)\n#endif\n#endif\n\n#define\tlowPowerBodOn(mode)\t\\\ndo { \t\t\t\t\t\t\\\n set_sleep_mode(mode); \\\n cli();\t\t\t\t\\\n sleep_enable();\t\t\\\n sei();\t\t\t\t\\\n sleep_cpu();\t\t\t\\\n sleep_disable();\t\t\\\n sei();\t\t\t\t\\\n} while (0);\n\n// Only Pico Power devices can change BOD settings through software\n#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n#define\tlowPowerBodOff(mode)\\\ndo { \t\t\t\t\t\t\\\n set_sleep_mode(mode); \\\n cli();\t\t\t\t\\\n sleep_enable();\t\t\\\n\t\t\tsleep_bod_disable(); \\\n sei();\t\t\t\t\\\n sleep_cpu();\t\t\t\\\n sleep_disable();\t\t\\\n sei();\t\t\t\t\\\n} while (0);\n#endif\n\n// Some macros is still missing from AVR GCC distribution for ATmega32U4\n#if defined __AVR_ATmega32U4__\n\t// Timer 4 PRR bit is currently not defined in iom32u4.h\n\t#ifndef PRTIM4\n\t\t#define PRTIM4 4\n\t#endif\n\n\t// Timer 4 power reduction macro is not defined currently in power.h\n\t#ifndef power_timer4_disable\n\t\t#define power_timer4_disable()\t(PRR1 |= (uint8_t)(1 << PRTIM4))\n\t#endif\n\n\t#ifndef power_timer4_enable\n\t\t#define power_timer4_enable()\t\t(PRR1 &= (uint8_t)~(1 << PRTIM4))\n\t#endif\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega328P/168 into idle state. Please make sure you\n*\t\t\t understand the implication and result of disabling module.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n* 4. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 5. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 6. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 7. usart0\t\tUSART0 module disable control:\n*\t\t\t\t(a) USART0_OFF - Turn off USART0 module\n*\t\t\t\t(b) USART0_ON - Leave USART0 module in its default state\n*\n* 8. twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n*******************************************************************************/\n#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168__) || defined (__AVR_ATmega168P__) || defined (__AVR_ATmega88__)\nvoid\tLowPowerClass::idle(period_t period, adc_t adc, timer2_t timer2,\n\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0,\n\t\t\t\t\t\t\tspi_t spi, usart0_t usart0,\ttwi_t twi)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\n\t\tpower_timer2_disable();\n\t}\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_disable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_disable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n \n\t\tpower_timer2_enable();\n\t}\n\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_enable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_enable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_enable();\n}\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega32U4 into idle state. Please make sure you\n*\t\t\t understand the implication and result of disabling module.\n*\t\t\t Take note that Timer 2 is not available and USART0 is replaced\n* \t\t\t with USART1 on ATmega32U4.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer4\t\tTimer 4 module disable control:\n*\t\t\t\t(a) TIMER4_OFF - Turn off Timer 4 module\n*\t\t\t\t(b) TIMER4_ON - Leave Timer 4 module in its default state\n*\n* 4. timer3\t\tTimer 3 module disable control:\n*\t\t\t\t(a) TIMER3_OFF - Turn off Timer 3 module\n*\t\t\t\t(b) TIMER3_ON - Leave Timer 3 module in its default state\n*\n* 5. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 6. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 7. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 8. usart1\t\tUSART1 module disable control:\n*\t\t\t\t(a) USART1_OFF - Turn off USART1 module\n*\t\t\t\t(b) USART1_ON - Leave USART1 module in its default state\n*\n* 9. twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n* 10.usb\t\tUSB module disable control:\n*\t\t\t\t(a) USB_OFF - Turn off USB module\n*\t\t\t\t(b) USB_ON - Leave USB module in its default state\n*******************************************************************************/\n#if defined __AVR_ATmega32U4__\nvoid\tLowPowerClass::idle(period_t period, adc_t adc,\n\t\t\t\t\t\t\ttimer4_t timer4, timer3_t timer3,\n\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0,\n\t\t\t\t\t\t\tspi_t spi, usart1_t usart1,\ttwi_t twi, usb_t usb)\n{\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_disable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_disable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_disable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_disable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_disable();\n\tif (usb == USB_OFF)\t\t\tpower_usb_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_enable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_enable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_enable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_enable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_enable();\n\tif (usb == USB_OFF)\t\t\tpower_usb_enable();\n}\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega644P & ATmega1284P into idle state. Please make sure\n*\t\t\t you understand the implication and result of disabling module.\n*\t\t\t Take note that extra USART 1 compared to an ATmega328P/168.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n* 4. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 5. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 6. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 7. usart1\t\tUSART1 module disable control:\n*\t\t\t\t(a) USART1_OFF - Turn off USART1 module\n*\t\t\t\t(b) USART1_ON - Leave USART1 module in its default state\n*\n* 8. usart0\t\tUSART0 module disable control:\n*\t\t\t\t(a) USART0_OFF - Turn off USART0 module\n*\t\t\t\t(b) USART0_ON - Leave USART0 module in its default state\n*\n* 9. twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n*******************************************************************************/\n#if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega1284P__)\nvoid\tLowPowerClass::idle(period_t period, adc_t adc, timer2_t timer2,\n\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\tusart1_t usart1, usart0_t usart0, twi_t twi)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\n\t\tpower_timer2_disable();\n\t}\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t power_spi_disable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_disable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_disable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\n\t\tpower_timer2_enable();\n\t}\n\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_enable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_enable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_enable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_enable();\n}\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega2560 & ATmega1280 into idle state. Please make sure\n*\t\t\t you understand the implication and result of disabling module.\n*\t\t\t Take note that extra Timer 5, 4, 3 compared to an ATmega328P/168.\n*\t\t\t Also take note that extra USART 3, 2, 1 compared to an\n*\t\t\t ATmega328P/168.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer5\t\tTimer 5 module disable control:\n*\t\t\t\t(a) TIMER5_OFF - Turn off Timer 5 module\n*\t\t\t\t(b) TIMER5_ON - Leave Timer 5 module in its default state\n*\n* 4. timer4\t\tTimer 4 module disable control:\n*\t\t\t\t(a) TIMER4_OFF - Turn off Timer 4 module\n*\t\t\t\t(b) TIMER4_ON - Leave Timer 4 module in its default state\n*\n* 5. timer3\t\tTimer 3 module disable control:\n*\t\t\t\t(a) TIMER3_OFF - Turn off Timer 3 module\n*\t\t\t\t(b) TIMER3_ON - Leave Timer 3 module in its default state\n*\n* 6. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n* 7. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 8. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 9. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 10.usart3\t\tUSART3 module disable control:\n*\t\t\t\t(a) USART3_OFF - Turn off USART3 module\n*\t\t\t\t(b) USART3_ON - Leave USART3 module in its default state\n*\n* 11.usart2\t\tUSART2 module disable control:\n*\t\t\t\t(a) USART2_OFF - Turn off USART2 module\n*\t\t\t\t(b) USART2_ON - Leave USART2 module in its default state\n*\n* 12.usart1\t\tUSART1 module disable control:\n*\t\t\t\t(a) USART1_OFF - Turn off USART1 module\n*\t\t\t\t(b) USART1_ON - Leave USART1 module in its default state\n*\n* 13.usart0\t\tUSART0 module disable control:\n*\t\t\t\t(a) USART0_OFF - Turn off USART0 module\n*\t\t\t\t(b) USART0_ON - Leave USART0 module in its default state\n*\n* 14.twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n*******************************************************************************/\n#if defined (__AVR_ATmega2560__) || defined (__AVR_ATmega1280__)\nvoid\tLowPowerClass::idle(period_t period, adc_t adc, timer5_t timer5,\n\t\t\t\t\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\n\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\tusart3_t usart3, usart2_t usart2, usart1_t usart1,\n\t\t\t usart0_t usart0, twi_t twi)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\n\t\tpower_timer2_disable();\n\t}\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer5 == TIMER5_OFF)\tpower_timer5_disable();\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_disable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_disable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t power_spi_disable();\n\tif (usart3 == USART3_OFF)\tpower_usart3_disable();\n\tif (usart2 == USART2_OFF)\tpower_usart2_disable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_disable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_disable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\n\t\tpower_timer2_enable();\n\t}\n\n\tif (timer5 == TIMER5_OFF)\tpower_timer5_enable();\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_enable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_enable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\tpower_spi_enable();\n\tif (usart3 == USART3_OFF)\tpower_usart3_enable();\n\tif (usart2 == USART2_OFF)\tpower_usart2_enable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_enable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_enable();\n\tif (twi == TWI_OFF)\t\t\tpower_twi_enable();\n}\n#endif\n\n/*******************************************************************************\n* Name: idle\n* Description: Putting ATmega256RFR2 into idle state. Please make sure\n*\t\t\t you understand the implication and result of disabling module.\n*\t\t\t Take note that extra Timer 5, 4, 3 compared to an ATmega328P/168.\n*\t\t\t Also take note that extra USART 1 compared to an\n*\t\t\t ATmega328P/168.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control:\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer5\t\tTimer 5 module disable control:\n*\t\t\t\t(a) TIMER5_OFF - Turn off Timer 5 module\n*\t\t\t\t(b) TIMER5_ON - Leave Timer 5 module in its default state\n*\n* 4. timer4\t\tTimer 4 module disable control:\n*\t\t\t\t(a) TIMER4_OFF - Turn off Timer 4 module\n*\t\t\t\t(b) TIMER4_ON - Leave Timer 4 module in its default state\n*\n* 5. timer3\t\tTimer 3 module disable control:\n*\t\t\t\t(a) TIMER3_OFF - Turn off Timer 3 module\n*\t\t\t\t(b) TIMER3_ON - Leave Timer 3 module in its default state\n*\n* 6. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n* 7. timer1\t\tTimer 1 module disable control:\n*\t\t\t\t(a) TIMER1_OFF - Turn off Timer 1 module\n*\t\t\t\t(b) TIMER1_ON - Leave Timer 1 module in its default state\n*\n* 8. timer0\t\tTimer 0 module disable control:\n*\t\t\t\t(a) TIMER0_OFF - Turn off Timer 0 module\n*\t\t\t\t(b) TIMER0_ON - Leave Timer 0 module in its default state\n*\n* 9. spi\t\tSPI module disable control:\n*\t\t\t\t(a) SPI_OFF - Turn off SPI module\n*\t\t\t\t(b) SPI_ON - Leave SPI module in its default state\n*\n* 10.usart1\t\tUSART1 module disable control:\n*\t\t\t\t(a) USART1_OFF - Turn off USART1 module\n*\t\t\t\t(b) USART1_ON - Leave USART1 module in its default state\n*\n* 11.usart0\t\tUSART0 module disable control:\n*\t\t\t\t(a) USART0_OFF - Turn off USART0 module\n*\t\t\t\t(b) USART0_ON - Leave USART0 module in its default state\n*\n* 12.twi\t\tTWI module disable control:\n*\t\t\t\t(a) TWI_OFF - Turn off TWI module\n*\t\t\t\t(b) TWI_ON - Leave TWI module in its default state\n*\n*******************************************************************************/\n#if defined (__AVR_ATmega256RFR2__)\nvoid\tLowPowerClass::idle(period_t period, adc_t adc, timer5_t timer5,\n\t\t\t\t\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttimer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\t\t\t\t\t\t\tusart1_t usart1,\n\t\t\t usart0_t usart0, twi_t twi)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\n\t\tpower_timer2_disable();\n\t}\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tADCSRA &= ~(1 << ADEN);\n\t\tpower_adc_disable();\n\t}\n\n\tif (timer5 == TIMER5_OFF)\tpower_timer5_disable();\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_disable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_disable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_disable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_disable();\n\tif (spi == SPI_OFF)\t\t\t power_spi_disable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_disable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_disable();\n\tif (twi == TWI_OFF)\t\t\t power_twi_disable();\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_IDLE);\n\n\tif (adc == ADC_OFF)\n\t{\n\t\tpower_adc_enable();\n\t\tADCSRA |= (1 << ADEN);\n\t}\n\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\n\t\tpower_timer2_enable();\n\t}\n\n\tif (timer5 == TIMER5_OFF)\tpower_timer5_enable();\n\tif (timer4 == TIMER4_OFF)\tpower_timer4_enable();\n\tif (timer3 == TIMER3_OFF)\tpower_timer3_enable();\n\tif (timer1 == TIMER1_OFF)\tpower_timer1_enable();\n\tif (timer0 == TIMER0_OFF)\tpower_timer0_enable();\n\tif (spi == SPI_OFF)\t\t\t power_spi_enable();\n\tif (usart1 == USART1_OFF)\tpower_usart1_enable();\n\tif (usart0 == USART0_OFF)\tpower_usart0_enable();\n\tif (twi == TWI_OFF)\t\t\t power_twi_enable();\n}\n#endif\n\n\n/*******************************************************************************\n* Name: adcNoiseReduction\n* Description: Putting microcontroller into ADC noise reduction state. This is\n*\t\t\t a very useful state when using the ADC to achieve best and low\n* noise signal.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control. Turning off the ADC module is\n*\t\t\t\tbasically removing the purpose of this low power mode.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::adcNoiseReduction(period_t period, adc_t adc,\n\t\t\t\t\t\t\t\t\t\t timer2_t timer2)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\t}\n\t#endif\n\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tlowPowerBodOn(SLEEP_MODE_ADC);\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\t}\n\t#endif\n}\n\n/*******************************************************************************\n* Name: powerDown\n* Description: Putting microcontroller into power down state. This is\n*\t\t\t the lowest current consumption state. Use this together with\n*\t\t\t external pin interrupt to wake up through external event\n*\t\t\t triggering (example: RTC clockout pin, SD card detect pin).\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control. Turning off the ADC module is\n*\t\t\t\tbasically removing the purpose of this low power mode.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. bod\t\tBrown Out Detector (BOD) module disable control:\n*\t\t\t\t(a) BOD_OFF - Turn off BOD module\n*\t\t\t\t(b) BOD_ON - Leave BOD module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::powerDown(period_t period, adc_t adc, bod_t bod)\n{\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\tif (bod == BOD_OFF)\n\t{\n\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n\t\t\tlowPowerBodOff(SLEEP_MODE_PWR_DOWN);\n\t\t#else\n\t\t\tlowPowerBodOn(SLEEP_MODE_PWR_DOWN);\n\t\t#endif\n\t}\n\telse\n\t{\n\t\tlowPowerBodOn(SLEEP_MODE_PWR_DOWN);\n\t}\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n}\n\n/*******************************************************************************\n* Name: powerSave\n* Description: Putting microcontroller into power save state. This is\n*\t\t\t the lowest current consumption state after power down.\n*\t\t\t Use this state together with an external 32.768 kHz crystal (but\n*\t\t\t 8/16 MHz crystal/resonator need to be removed) to provide an\n*\t\t\t asynchronous clock source to Timer 2. Please take note that\n*\t\t\t Timer 2 is also used by the Arduino core for PWM operation.\n*\t\t\t Please refer to wiring.c for explanation. Removal of the external\n*\t\t\t 8/16 MHz crystal/resonator requires the microcontroller to run\n*\t\t\t on its internal RC oscillator which is not so accurate for time\n*\t\t\t critical operation.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control. Turning off the ADC module is\n*\t\t\t\tbasically removing the purpose of this low power mode.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. bod\t\tBrown Out Detector (BOD) module disable control:\n*\t\t\t\t(a) BOD_OFF - Turn off BOD module\n*\t\t\t\t(b) BOD_ON - Leave BOD module in its default state\n*\n* 4. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::powerSave(period_t period, adc_t adc, bod_t bod,\n\t\t\t\t\t\t\t timer2_t timer2)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\t}\n\t#endif\n\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tif (bod == BOD_OFF)\n\t{\n\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n\t\t\tlowPowerBodOff(SLEEP_MODE_PWR_SAVE);\n\t\t#else\n\t\t\tlowPowerBodOn(SLEEP_MODE_PWR_SAVE);\n\t\t#endif\n\t}\n\telse\n\t{\n\t\tlowPowerBodOn(SLEEP_MODE_PWR_SAVE);\n\t}\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\t}\n\t#endif\n}\n\n/*******************************************************************************\n* Name: powerStandby\n* Description: Putting microcontroller into power standby state.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control. Turning off the ADC module is\n*\t\t\t\tbasically removing the purpose of this low power mode.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. bod\t\tBrown Out Detector (BOD) module disable control:\n*\t\t\t\t(a) BOD_OFF - Turn off BOD module\n*\t\t\t\t(b) BOD_ON - Leave BOD module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::powerStandby(period_t period, adc_t adc, bod_t bod)\n{\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\tif (bod == BOD_OFF)\n\t{\n\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n\t\t\tlowPowerBodOff(SLEEP_MODE_STANDBY);\n\t\t#else\n\t\t\tlowPowerBodOn(SLEEP_MODE_STANDBY);\n\t\t#endif\n\t}\n\telse\n\t{\n\t\tlowPowerBodOn(SLEEP_MODE_STANDBY);\n\t}\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n}\n\n/*******************************************************************************\n* Name: powerExtStandby\n* Description: Putting microcontroller into power extended standby state. This\n*\t\t\t is different from the power standby state as it has the\n*\t\t\t capability to run Timer 2 asynchronously.\n* Not implemented on Atmega88 and Atmega168.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. period Duration of low power mode. Use SLEEP_FOREVER to use other wake\n*\t\t\t\tup resource:\n*\t\t\t\t(a) SLEEP_15MS - 15 ms sleep\n*\t\t\t\t(b) SLEEP_30MS - 30 ms sleep\n*\t\t\t\t(c) SLEEP_60MS - 60 ms sleep\n*\t\t\t\t(d) SLEEP_120MS - 120 ms sleep\n*\t\t\t\t(e) SLEEP_250MS - 250 ms sleep\n*\t\t\t\t(f) SLEEP_500MS - 500 ms sleep\n*\t\t\t\t(g) SLEEP_1S - 1 s sleep\n*\t\t\t\t(h) SLEEP_2S - 2 s sleep\n*\t\t\t\t(i) SLEEP_4S - 4 s sleep\n*\t\t\t\t(j) SLEEP_8S - 8 s sleep\n*\t\t\t\t(k) SLEEP_FOREVER - Sleep without waking up through WDT\n*\n* 2. adc\t\tADC module disable control.\n*\t\t\t\t(a) ADC_OFF - Turn off ADC module\n*\t\t\t\t(b) ADC_ON - Leave ADC module in its default state\n*\n* 3. bod\t\tBrown Out Detector (BOD) module disable control:\n*\t\t\t\t(a) BOD_OFF - Turn off BOD module\n*\t\t\t\t(b) BOD_ON - Leave BOD module in its default state\n*\n* 4. timer2\t\tTimer 2 module disable control:\n*\t\t\t\t(a) TIMER2_OFF - Turn off Timer 2 module\n*\t\t\t\t(b) TIMER2_ON - Leave Timer 2 module in its default state\n*\n*******************************************************************************/\nvoid\tLowPowerClass::powerExtStandby(period_t period, adc_t adc, bod_t bod,\n\t\t\t\t\t\t\t\t\t timer2_t timer2)\n{\n\t// Temporary clock source variable\n\tunsigned char clockSource = 0;\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n\t\t// Store current setting\n clockSource = TCCR2B;\n\n\t\t// Remove the clock source to shutdown Timer2\n\t\tTCCR2B &= ~(1 << CS22);\n\t\tTCCR2B &= ~(1 << CS21);\n\t\tTCCR2B &= ~(1 << CS20);\n\t}\n\t#endif\n\n\tif (adc == ADC_OFF)\tADCSRA &= ~(1 << ADEN);\n\n\tif (period != SLEEP_FOREVER)\n\t{\n\t\twdt_enable(period);\n\t\tWDTCSR |= (1 << WDIE);\n\t}\n\n\n\t#if defined (__AVR_ATmega88__) || defined (__AVR_ATmega168__) // SLEEP_MODE_EXT_STANDBY not implemented on Atmega88 / Atmega168\n\t#else\n\t\tif (bod == BOD_OFF)\n\t\t{\n\t\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)\n\t\t\t\tlowPowerBodOff(SLEEP_MODE_EXT_STANDBY);\n\t\t\t#else\n\t\t\t\tlowPowerBodOn(SLEEP_MODE_EXT_STANDBY);\n\t\t\t#endif\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlowPowerBodOn(SLEEP_MODE_EXT_STANDBY);\n\t\t}\n\t#endif\n\n\tif (adc == ADC_OFF) ADCSRA |= (1 << ADEN);\n\n\t#if !defined(__AVR_ATmega32U4__)\n\tif (timer2 == TIMER2_OFF)\n\t{\n // Restore previous setting\n TCCR2B = clockSource;\n\t}\n\t#endif\n}\n\n// sleep # of milliseconds using WDT (watchdog timer - accurate to within 10%, uses about 3uA)\nvoid LowPowerClass::longPowerDown(uint32_t sleepTime) {\n do {\n if (sleepTime > 8000)\n {\n powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);\n sleepTime-=8000;\n }\n else if (sleepTime > 4000)\n {\n powerDown(SLEEP_4S, ADC_OFF, BOD_OFF);\n sleepTime-=4000;\n }\n else if (sleepTime > 2000)\n {\n powerDown(SLEEP_2S, ADC_OFF, BOD_OFF);\n sleepTime-=2000;\n }\n else if (sleepTime > 1000)\n {\n powerDown(SLEEP_1S, ADC_OFF, BOD_OFF);\n sleepTime-=1000;\n }\n else if (sleepTime > 512)\n {\n powerDown(SLEEP_500MS, ADC_OFF, BOD_OFF);\n sleepTime-=512;\n }\n else if (sleepTime > 256)\n {\n powerDown(SLEEP_250MS, ADC_OFF, BOD_OFF);\n sleepTime-=256;\n }\n else if (sleepTime > 128)\n {\n powerDown(SLEEP_120MS, ADC_OFF, BOD_OFF);\n sleepTime-=128;\n }\n else if (sleepTime > 64)\n {\n powerDown(SLEEP_60MS, ADC_OFF, BOD_OFF);\n sleepTime-=64;\n }\n else if (sleepTime > 32)\n {\n powerDown(SLEEP_30MS, ADC_OFF, BOD_OFF);\n sleepTime-=32;\n }\n else if (sleepTime > 16)\n {\n powerDown(SLEEP_15MS, ADC_OFF, BOD_OFF);\n sleepTime-=16;\n }\n else\n {\n sleepTime=0;\n }\n } while(sleepTime);\n}\n\n/*******************************************************************************\n* Name: ISR (WDT_vect)\n* Description: Watchdog Timer interrupt service routine. This routine is\n*\t\t required to allow automatic WDIF and WDIE bit clearance in\n*\t\t\t hardware.\n*\n*******************************************************************************/\nISR (WDT_vect)\n{\n\t// WDIE & WDIF is cleared in hardware upon entering this ISR\n\twdt_disable();\n}\n\n#elif defined(__arm__)\n#if defined(__SAMD21__) || defined(ARDUINO_SAMD_ZERO)\n/*******************************************************************************\n* Name: standby\n* Description: Putting SAMD21G18A into idle mode. This is the lowest current\n* consumption mode. Requires separate handling of clock and\n* \t\t\t peripheral management (disabling and shutting down) to achieve\n* \t\t\t the desired current consumption.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. idleMode Idle mode level (0, 1, 2) where IDLE_2 level provide lowest\n* \t\t\t\tcurrent consumption in this mode.\n*\n*******************************************************************************/\nvoid\tLowPowerClass::idle(idle_t idleMode)\n{\n\tSCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;\n\tPM->SLEEP.reg = idleMode;\n\t__DSB();\n\t__WFI();\n}\n\n/*******************************************************************************\n* Name: standby\n* Description: Putting SAMD21G18A into standby mode. This is the lowest current\n* consumption mode. Use this together with the built-in RTC (use\n* RTCZero library) or external pin interrupt to wake up through\n* external event triggering.\n*\n* Argument \tDescription\n* ========= \t===========\n* 1. NIL\n*\n*******************************************************************************/\nvoid\tLowPowerClass::standby()\n{\n\tSCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;\n\t__DSB();\n\t__WFI();\n}\n\n#else\n\t#error \"Please ensure chosen MCU is a SAMD21\"\n#endif\n#else\n\t#error \"Processor architecture is not supported.\"\n#endif\n\nLowPowerClass LowPower;" }, { "name": "src/LowPower.h", "url": "src/LowPower.h", "fileData": "#ifndef LowPower_h\n#define LowPower_h\n\n#include \"Arduino.h\"\n\nenum period_t\n{\n\tSLEEP_15MS,\n\tSLEEP_30MS,\n\tSLEEP_60MS,\n\tSLEEP_120MS,\n\tSLEEP_250MS,\n\tSLEEP_500MS,\n\tSLEEP_1S,\n\tSLEEP_2S,\n\tSLEEP_4S,\n\tSLEEP_8S,\n\tSLEEP_FOREVER\n};\n\nenum bod_t\n{\n\tBOD_OFF,\n\tBOD_ON\n};\n\nenum adc_t\n{\n\tADC_OFF,\n\tADC_ON\n};\n\nenum timer5_t\n{\n\tTIMER5_OFF,\n\tTIMER5_ON\n};\n\nenum timer4_t\n{\n\tTIMER4_OFF,\n\tTIMER4_ON\n};\n\nenum timer3_t\n{\n\tTIMER3_OFF,\n\tTIMER3_ON\n};\n\nenum timer2_t\n{\n\tTIMER2_OFF,\n\tTIMER2_ON\n};\n\nenum timer1_t\n{\n\tTIMER1_OFF,\n\tTIMER1_ON\n};\n\nenum timer0_t\n{\n\tTIMER0_OFF,\n\tTIMER0_ON\n};\n\nenum spi_t\n{\n\tSPI_OFF,\n\tSPI_ON\n};\n\nenum usart0_t\n{\n\tUSART0_OFF,\n\tUSART0_ON\n};\n\nenum usart1_t\n{\n\tUSART1_OFF,\n\tUSART1_ON\n};\n\nenum usart2_t\n{\n\tUSART2_OFF,\n\tUSART2_ON\n};\n\nenum usart3_t\n{\n\tUSART3_OFF,\n\tUSART3_ON\n};\n\nenum twi_t\n{\n\tTWI_OFF,\n\tTWI_ON\n};\n\nenum usb_t\n{\n\tUSB_OFF,\n\tUSB_ON\n};\n\nenum idle_t\n{\n\tIDLE_0,\n\tIDLE_1,\n\tIDLE_2\n};\n\nclass LowPowerClass\n{\n\tpublic:\n\t\t#if defined (__AVR__)\n\n\t\t\t#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168__) || defined (__AVR_ATmega168P__) || defined (__AVR_ATmega88__)\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer2_t timer2,\n\t\t\t\t\t\t timer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t usart0_t usart0, twi_t twi);\n\t\t\t#elif defined __AVR_ATmega644P__ || defined (__AVR_ATmega1284P__)\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer2_t timer2,\n\t\t\t\t\t\t\t timer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\t usart1_t usart1, usart0_t usart0, twi_t twi);\n\t\t\t#elif defined __AVR_ATmega2560__\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer5_t timer5,\n\t\t\t\t\t\t\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\n\t\t\t\t\t\t\t timer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t\t usart3_t usart3, usart2_t usart2, usart1_t usart1,\n\t\t\t\t\t\t\t usart0_t usart0, twi_t twi);\n\t\t\t#elif defined __AVR_ATmega256RFR2__\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer5_t timer5,\n\t\t\t\t\t\t\t\t\t timer4_t timer4, timer3_t timer3, timer2_t timer2,\n\t\t\t\t \t\t\t\t timer1_t timer1, timer0_t timer0, spi_t spi,\n\t\t\t\t\t\t usart1_t usart1,\n\t\t\t\t\t\t\t\t\t usart0_t usart0, twi_t twi);\n\t\t\t#elif defined __AVR_ATmega32U4__\n\t\t\t\tvoid\tidle(period_t period, adc_t adc, timer4_t timer4,\n\t\t\t\t timer3_t timer3, timer1_t timer1, timer0_t timer0,\n\t\t\t\t spi_t spi, usart1_t usart1, twi_t twi, usb_t usb);\n\t\t\t#else\n\t\t\t\t#error \"Please ensure chosen MCU is either 88, 168, 168P, 328P, 32U4, 2560 or 256RFR2.\"\n\t\t\t#endif\n\t\t\tvoid\tadcNoiseReduction(period_t period, adc_t adc, timer2_t timer2) __attribute__((optimize(\"-O1\")));\n\t\t\tvoid\tpowerDown(period_t period, adc_t adc, bod_t bod) __attribute__((optimize(\"-O1\")));\n\t\t\tvoid\tpowerSave(period_t period, adc_t adc, bod_t bod, timer2_t timer2) __attribute__((optimize(\"-O1\")));\n\t\t\tvoid\tpowerStandby(period_t period, adc_t adc, bod_t bod) __attribute__((optimize(\"-O1\")));\n\t\t\tvoid\tpowerExtStandby(period_t period, adc_t adc, bod_t bod, timer2_t timer2) __attribute__((optimize(\"-O1\")));\n void longPowerDown(uint32_t sleepTime);\n\t\t#elif defined (__arm__)\n\t\t\t#if defined(__SAMD21__) || defined(ARDUINO_SAMD_ZERO)\n\t\t\t\tvoid\tidle(idle_t idleMode);\n\t\t\t\tvoid\tstandby();\n\t\t\t#else\n\t\t\t\t#error \"Please ensure chosen MCU is a SAMD21\"\n\t\t\t#endif\n\n\t\t#else\n\n\t\t\t#error \"Processor architecture is not supported.\"\n\n\t\t#endif\n};\n\nextern LowPowerClass LowPower;\n#endif" } ] } }, "platform": [ "mblockpc" ], "extApiVersion": [ "1.0.3" ], "name": "vdr DF3231 LowPower", "targets": [ "arduino_mega2560", "arduino_uno" ], "id": "19199", "sort": 999, "description": "", "homepage": "https://www.du-man.net", "sourceFiles": "", "code": "// enter your javascript code here\n", "handler": "\nconst ExtHandler = {\n\n // when extension is loaded\n onLoad(app, target) {\n },\n\n // when extension is unloaded\n onUnload(app) {\n // TODO\n },\n\n // when device is connected\n onConnect(app, device) {\n // TODO\n },\n\n // when device is disconnected\n onDisconnect(app, device) {\n // TODO\n },\n\n // when stop button is clicked\n onStopAll(app, device) {\n // TODO\n },\n\n // before switch to upload mode\n beforeChangeUploadMode(app, device) {\n // TODO\n return true;\n },\n\n // before switch to debug mode\n beforeChangeDebugMode(app, device) {\n // TODO\n return true;\n },\n\n // after switched to upload mode\n afterChangeUploadMode(app, device) {\n // TODO\n return true;\n },\n\n // after switched to debug mode\n afterChangeDebugMode(app, device) {\n // TODO\n return true;\n },\n\n // when device is selected\n onSelect(app, device) {\n // TODO\n },\n\n // when device is unselected\n onUnselect(app, device) {\n // TODO\n },\n\n // before upload code\n beforeCodeUpload(app, device) {\n // TODO\n },\n\n // after code uploaded\n afterCodeUpload(app, device) {\n // TODO\n },\n\n // when receiving and reading byte\n onRead(app, device) {\n // TODO\n }\n}\n" }PK }'Vo5L*data.bak/categroy.json[ { "identify": "cate_a925a78d", "name": "vdr DF3231", "menuIconURI": "", "blockIcon": { "name": "clock.png", "url": "https://mblock-expanded.oss-cn-shenzhen.aliyuncs.com/98d512dcdecd49de87d221d760624838.png" }, "colors": "#B39DDB", "eid": "19199", "id": "32625", "sort": 999, "create_time": 1634911077, "modify_time": 1656663712, "uid": 1281238 }, { "eid": "19199", "identify": "cate_4b4990e1", "name": "Low Power", "menuIconURI": "", "blockIcon": { "name": "power.png", "url": "https://mblock-expanded.oss-cn-shenzhen.aliyuncs.com/5400cbe10720481c814bced8ad030a0d.png" }, "colors": "#6739B6", "id": "32651", "sort": 999, "create_time": 1634911077, "modify_time": 1656663993, "uid": 1281238 } ]PK }'VgFFdata.bak/block.json[ { "eid": "19199", "cid": "32625", "name": "Initialiser DS3231", "opcode": "BLOCK_1656602282019", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "id": "318927", "sort": 0, "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": [ "\"src/DS3231.h\"" ], "lib": "", "declare": "DS3231 DS3231_clock;\r\nbool DS3231_isWakeUP = false;\r\nbool DS3231_isTime = false;\r\nint DS3231_i = 0;\r\n", "setup": "", "code": "", "_loop": "" } }, "create_time": 1634911077, "modify_time": 1656614762, "uid": 1281238 }, { "eid": "19199", "cid": "32625", "name": "régler l'heure @[Number](number) minute @[Number](number) seconde @[Number](number) ", "opcode": "BLOCK_1656594936925", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "id": "318918", "sort": 1, "args": [ { "type": "number", "name": "heure", "val": 20 }, { "type": "number", "name": "minute", "val": 15 }, { "type": "number", "name": "seconde", "val": 30 } ], "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": [], "lib": "", "declare": "", "setup": "", "code": "DS3231_clock.setHour(/*{heure}*/);\r\nDS3231_clock.setMinute(/*{minute}*/);\r\nDS3231_clock.setSecond(/*{seconde}*/);", "_loop": "" } }, "create_time": 1634911077, "modify_time": 1656603313, "uid": 1281238 }, { "eid": "19199", "cid": "32625", "name": "régler la date @[Number](number) mois @[Number](number) année @[Number](number) ", "opcode": "BLOCK_1656595410179", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "id": "318919", "sort": 2, "args": [ { "type": "number", "name": "date", "val": 20 }, { "type": "number", "name": "mois", "val": 6 }, { "type": "number", "name": "annee", "val": 2022 } ], "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": [], "lib": "", "declare": "", "setup": "", "code": "DS3231_clock.setDate(/*{date}*/);\r\nDS3231_clock.setMonth(/*{mois}*/);\r\nDS3231_clock.setYear((/*{annee}*/>1000) ? /*{annee}*/ % 100 : /*{annee}*/);", "_loop": "" } }, "create_time": 1634911077, "modify_time": 1656607971, "uid": 1281238 }, { "eid": "19199", "cid": "32625", "name": "@[Dropdown](fieldMenu) ", "opcode": "BLOCK_1656595749942", "blockType": "number", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "id": "318920", "sort": 3, "args": [ { "type": "fieldMenu", "name": "mode", "menus": [ { "text": "heure", "value": "0" }, { "text": "minute", "value": "1" }, { "text": "seconde", "value": "2" }, { "text": "date", "value": "3" }, { "text": "mois", "value": "4" }, { "text": "annee", "value": "5" } ], "val": "0" } ], "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": [], "lib": "", "declare": "int DS3231_getTime(int mode){\r\n bool b=false;\r\n switch (mode) {\r\n case 0:\r\n return int(DS3231_clock.getHour(b, b));\r\n break;\r\n case 1:\r\n return int(DS3231_clock.getMinute());\r\n break;\r\n case 2:\r\n return int(DS3231_clock.getSecond());\r\n break;\r\n case 3:\r\n return int(DS3231_clock.getDate());\r\n break;\r\n case 4:\r\n return int(DS3231_clock.getMonth(b));\r\n break;\r\n case 5:\r\n return int(DS3231_clock.getYear());\r\n break; \r\n }\r\n}", "setup": "", "code": "DS3231_getTime(/*{mode}*/)", "_loop": "" } }, "create_time": 1634911077, "modify_time": 1656608497, "uid": 1281238 }, { "eid": "19199", "cid": "32625", "name": "@[Dropdown](fieldMenu) ", "opcode": "BLOCK_1656596148335", "blockType": "string", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "id": "318921", "sort": 4, "args": [ { "type": "fieldMenu", "name": "mode", "menus": [ { "text": "Heure formatée", "value": "0" }, { "text": "Date formatée", "value": "1" } ], "val": "0" } ], "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": [], "lib": "", "declare": "String strTimeFormat(byte value){\r\n String s;\r\n s=String(value, DEC);\r\n if (s.length()==1) s = \"0\"+s;\r\n return s;\r\n}\r\n\r\nString DS3231_getSTime(int mode){\r\n String s;\r\n bool b=false;\r\n if (mode==0){\r\n s = strTimeFormat(DS3231_clock.getHour(b, b));\r\n s += \":\";\r\n s += strTimeFormat(DS3231_clock.getMinute()); \r\n s += \":\";\r\n s += strTimeFormat(DS3231_clock.getSecond());\r\n }else if (mode==1){\r\n s = strTimeFormat(DS3231_clock.getDate()); \r\n s += \"/\";\r\n s += strTimeFormat(DS3231_clock.getMonth(b)); \r\n s += \"/\";\r\n s += strTimeFormat(DS3231_clock.getYear());\r\n }\r\n return s;\r\n}", "setup": "", "code": "DS3231_getSTime(/*{mode}*/)", "_loop": "" } }, "create_time": 1634911077, "modify_time": 1656603334, "uid": 1281238 }, { "eid": "19199", "cid": "32625", "name": "Alarme n° @[Dropdown](fieldMenu) sur @[Dropdown](fieldMenu) à executer toutes les @[Number](number) @[Dropdown](fieldMenu) ", "opcode": "BLOCK_1656596600428", "blockType": "conditional", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "id": "318922", "sort": 5, "args": [ { "type": "fieldMenu", "name": "alarm", "val": "1", "menus": [ { "text": "1", "value": "1" }, { "text": "2", "value": "2" } ] }, { "type": "fieldMenu", "name": "pinDigit", "val": "2", "menus": [ { "text": "D2", "value": "2" }, { "text": "D3", "value": "3" }, { "text": "D4", "value": "4" }, { "text": "D5", "value": "5" }, { "text": "D6", "value": "6" }, { "text": "D7", "value": "7" }, { "text": "D8", "value": "8" } ] }, { "type": "number", "name": "i", "val": 1 }, { "type": "fieldMenu", "name": "mode", "val": "0", "menus": [ { "text": "minute", "value": "0" }, { "text": "heure", "value": "1" }, { "text": "jour", "value": "2" } ] } ], "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": [], "lib": "", "declare": "void DS3231_setAlarm(int alarm, int mode){\r\n if(alarm==1){\r\n DS3231_clock.turnOffAlarm(1);\r\n switch (mode) {\r\n case 0: // quand les secondes valent x\r\n DS3231_clock.setA1Time(0, 0, 0, 0, 0b1110, false, false, false); \r\n break;\r\n case 1: // quand les minutes valent x\r\n DS3231_clock.setA1Time(0, 0, 0, 0, 0b1100, false, false, false); \r\n break;\r\n case 2: // quand les heures valent x\r\n DS3231_clock.setA1Time(0, 0, 0, 0, 0b1000, false, false, false); \r\n break;\r\n }\r\n DS3231_clock.turnOnAlarm(1);\r\n }else if(alarm==2){\r\n DS3231_clock.turnOffAlarm(2);\r\n switch (mode) {\r\n case 0: // quand les minutes valent 0\r\n DS3231_clock.setA2Time(0, 0, 0, 0b111, false, false, false); \r\n break;\r\n case 1: // quand les minutes valent x\r\n DS3231_clock.setA2Time(0, 0, 0, 0b110, false, false, false); \r\n break;\r\n case 2: // quand les heures valent x\r\n DS3231_clock.setA2Time(0, 0, 0, 0b100, false, false, false); \r\n break;\r\n }\r\n DS3231_clock.turnOnAlarm(2);\r\n }\r\n delay(100);\r\n}\r\n\r\nvoid DS3231_doWhenWakeUp(){\r\n if(digitalRead(/*{pinDigit}*/)==LOW){\r\n DS3231_clock.turnOffAlarm(/*{alarm}*/);\r\n DS3231_setAlarm(/*{alarm}*/,/*{mode}*/);\r\n DS3231_i ++;\r\n if(DS3231_i == /*{i}*/){\r\n\r\n /*{$BRANCH1}*/ \r\n \r\n DS3231_i=0;\r\n\r\n }\r\n }\r\n}\r\n", "setup": "", "code": "DS3231_setAlarm(/*{alarm}*/,/*{mode}*/);", "_loop": "DS3231_doWhenWakeUp();" } }, "create_time": 1634911077, "modify_time": 1656668131, "uid": 1281238 }, { "eid": "19199", "cid": "32625", "name": "Définir alarme n° @[Dropdown](fieldMenu) le @[Number](number) à @[Number](number) : @[Number](number) ", "opcode": "BLOCK_1656597084419", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "id": "318923", "sort": 6, "args": [ { "type": "fieldMenu", "name": "numero", "menus": [ { "text": "1", "value": "1" }, { "text": "2", "value": "2" } ], "val": "1" }, { "type": "number", "name": "jour", "val": 5 }, { "type": "number", "name": "heure", "val": 20 }, { "type": "number", "name": "minute", "val": 30 } ], "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": [], "lib": "", "declare": "", "setup": "", "code": "", "_loop": "" } }, "create_time": 1634911077, "modify_time": 1656603349, "uid": 1281238 }, { "eid": "19199", "cid": "32651", "name": "Veille. Réveil à partir de @[Dropdown](fieldMenu) ", "opcode": "BLOCK_1656663686735", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "sort": 999, "args": [ { "type": "fieldMenu", "name": "pinDigit", "val": "2", "menus": [ { "text": "D2", "value": "2" }, { "text": "D3", "value": "3" } ] } ], "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": [ "\"src/LowPower.h\"" ], "lib": "", "declare": "", "setup": "", "code": "LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);", "_loop": "" } }, "id": "319095", "create_time": 1634911077, "modify_time": 1656666763, "uid": 1281238 }, { "eid": "19199", "cid": "32651", "name": "Veille 8s", "opcode": "BLOCK_1656663686984", "blockType": "command", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "sort": 999, "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": [ "\"src/LowPower.h\"" ], "lib": "", "declare": "", "setup": "", "code": "LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);\r\n//Serial.println(\"reveil\");\r\n//delay(100);", "_loop": "" } }, "id": "319096", "create_time": 1634911077, "modify_time": 1656663750, "uid": 1281238 }, { "eid": "19199", "cid": "32651", "name": "Voltage solaire", "opcode": "BLOCK_1656663687195", "blockType": "number", "checkboxInFlyout": false, "gap": 12, "disableOnline": false, "disableOffline": false, "generatorCode": false, "blockState": "incomplete", "sort": 999, "handler": { "onRun": "(args, app, device, block) => {\n // JavaScript code\n}" }, "codes": { "arduinoc": { "include": "", "lib": "", "declare": "const int analogInPin = A0;", "setup": "", "code": "(float((analogRead(analogInPin))*5)/1023*2)", "_loop": "" } }, "id": "319097", "create_time": 1634911077, "modify_time": 1673106293, "uid": 1281238 } ]PK }'V)L data.bak/translate.json[]PK }'V)L data.bak/facepanel.json[]PK }'Vimgs/PK }'VwP,,)imgs/98d512dcdecd49de87d221d760624838.pngPNG  IHDRddpTzTXtRaw profile type exifxڭir#9sq s$Tn'D*cW ћJ-gWlΓjq;5xs)?>x:ҧkv7o&Z@5P ‘_jz׍׏^7;fIw?+ \gk߷=g{?}bܯ[_4<]^B|{f=fB_м1ra,pߖ.$le'34,6+,cUV]m̆Avi]vmN8O9?o"k53GָjJyD'I9#c>:2^3[]^SP"y2F v>_Gy3?e(u3%7cO*6P})=yiQ3\R䩫NxL\)]6vXIY0yxڹZz+]+mNccK& fMG{m P|K 2/B&6Cj;5c{I;TB$H ;?-m,F;3m Jyj,#iie48OmǍʳA8[˳ĸuD`~`$y9f՚]Nƛ /rh+cH Ρ{Co*ss@_"NV]a*wg/7a1lg>yͤxrqײ!lr4[+#3&WBxD&ujg),`9 L/yϽś'af Ä]}sKhj(-%׸<_;5{6L-Խ9>m_d4T8ucžEqQ*0P1@p'+ana>w@/-N\`GjḬК/ݡ?uXMHw;W#7j͉ZT͂ c @X)A(  34_4Lz׭"#BH,~6[G Pa'D ;3ؐ#܅[!D?)ޯͬZ{O518]k.ƋZm@=kY%-aYBb̕Gp6zF *aNC{f)n%T4؉AaemL6Adnz$4N/$%j(6`;L&^6'i~.X xб;E0̶ )HV )( p@Zb<DŽBxUx2̃ sl)$_I. G.1aros.Uә+kDUjG_*2d-Q CTֆPl<쳵#k͟/8sm[V&+Y{T2F*w>{M֫2Kt.rMA$Fa̐XIjMdpDoj*^sY ٨YM P0(xc<`:s힆 e0=nIy4 `CGSOufI&vˣ1̵qVy3H]#`aN&Z*b̢^W7J|@~<$1vگqp_+Da(J # sh3LXPv!*ndǬg6Nppõ P+.kp/8UݴG kڜQuDj1Vb3 NQ* ?).4 ,̌GJa|UOH$̜0R3 .3tΐO Cr M kfon *Eģ/Sce`f^CrNR 9SB#IሲhHfEx ҂p WQPh$0.:zkW+4Hc5j1 tMQ82nII$'*^Iog?V Wއ&H?.k)畸,e< `Ås~2DDhP>)lJ~1kCOZ§r ;1f@.uĝ\ʑ3C5fPX4[ |TU:dăt2⃊ ͘t`[uǷkm ucJ d\;~ #ܯަnTEVg=CKZjTNY4T"ë-z'5&dAEZ; Y'v㦹tPo޺-]!`M!wtTvQMzS\-41}ԉm*CGF0SJXƑkrFN_sv?H{.'Oy١_8Bܱ٥ 'Y#ģLy"yxxQV|'Zd#6WRBT+X@)"WUuX! f)6x>ˑP@~ǭNa~L}`q!'M,O1(uȸ-UL21@eb#*vzy}PQRjcl=OJ'^&q򴾺GNGzAtN5v'BJ OwGluaa1NX6sdk1DU+mR-HWދX>* 5m_b:)17f&Mq\'kFfڅPRMmp#>Ӻ*` &z %P@7=H:tI+wnj,eUütthҬҁa4*,<wV^Dvo0RVSQڸcC.Y"0Za _C^1s"pd',$MJ#j1ru&8I_FHg߮88ɡ'aΤ :Y}@y;dgh RnA3>ٯ`ָt?JRL@:;c`ۻBd66§_IIEQxa?o@r 2"""LpI٤C]wďdtbd0%,l }K5q൬dvhlPzTXtRaw profile type iptcx,(IR# .c #K D4dCD 01P%+bK iCCPICC profilex}=H@_S";dNĊ8J`Zu0ChҐ8 ?.κ: "ƃ~{2S͎ @,#܊xEFD3Dz!u_"<ܟWɛ ijL7,uMKOb%I!>'7ď\]~\tX!##6ۘ x8 Y[r5_kiFH 2@"jH~?ɵFyTBr[t1Ŷ?F.Шm7N3p:0Izm⺥{0KH~B7倁[g C]-X<ۿg\rP iTXtXML:com.adobe.xmp kbKGD pHYs.#.#x?vtIME :7A! IDATx]kT{2;CC4b5h\kh ZlRSƀ_*bMV 1Ĉ`7MY agw<{9~𖮰5ݙ4ɹ?QWſ3L2\Y2ԧO~8"ОN;&LXѬ(Oc1"")4EQý'4EI:uRd F#@_iڅDt9!DC"fvwSS6Ƙ& j"Na_kDclLpmIl> vS tziOȠv1M]׿۰D:tt۶I)%Bid20DV)R_ ;u'Dt~9H)(MDElӖ^dKZZZΖR#+E2M{:60JG4MY LV*D l~u3){CBr\HjȖ'5 qmKzzzXz7% Lk )vc麾رcJ9,b0-}9+p(Eqw-EɠK)2&lF2`2Lf$x2LӜ=> #`ae?! Z"㱀 ~L&ϬTiyG= m~lG۞ !C?X,VB;qBȾñ?vt ЖJF RGG̭_jQ%d)~M:!|]2l q3_UZ[l 0#{ d>>>'HZ~1'6'F_e8xz<qRS>⋦ЕGq!z߸r4kCGH<_Ø{$\38)J )rg~|>?GUuR.NUw(&$HdE, c2rk|>".J"XiGd|>d(L#;7B:;;o""MiD1 ѫ8xTCU͑AӴ-D㑫O{bADxEn!.p|!=eY/G.˲^^rNj[Ǐ\DbU16b-roi0 y"d&zܣD=[ߟD<6)\[=OD<w!<2#aN"DӴȥeIQ6d2C;,]D.->8!cnKUں;riyp|LepBȣ Mr)M>R nlvqBb؏<:t=rgej֭455 fi&ד@i?5Rʅ, 6zReض} sQH^!\ND9޵kWSM"1J9wSUյ]tѶB w<Z%eҤI?]_̈m6 cH7P(ll/ 4kRZI+UMMdBxf"ɍ8g !>*0ί9'$͞*t;rO]O 0 {mۯrΧWZvI)3lC1-=!a4UP=}6\5 cA%t8 upJ{&}FW1ϔmx#e(hR!%SZd$|t&(6/i+L9L `f)rRz I)wxGr]VX?I))۔Rţ]粄^+fFHssf": )izBO166]le-B\27KZuxxy 58٬ r;E)A!#e/-;e.S]E LSN]>%wVJfzMM!h°ka*4-]y~+TqqL[ix&;iիW3˲sDxWzy}n饰7S |>.Xf)Mg+mm}zMDIr|#GV~]M΋h8LZ^XV`w4i!2/ e'CڽflV=6E4c[ںB_0=}$~y )"CJyj)pec}&R^UUE~\d, x;u#4W{T1α)/!CHy%w}}};G962{QhAIRUǑ%A6Z6Xb)#Y9Ox$}+TRTX[ARuZV{KC>ŹL0ŵFD&0 OEׇ0#X44]d9wj9Կ4.|0JػwomS,QCi[/YtgŸ(PH)wyh{aKpiRDimӫ;Veb4LR  UUm] mmm!GD튢\[Ihclc|Vs>YU?""jP,gƑǑ!#X!RԷm~[SKRJ۶rΆ%u 4חo$a[JP8 }Zas>>gX &g^fx8o6i464s$,"#ibo32V͚a5B(?gŜ8cLsyO0 oSJWUU 4b4cVmG=oԩS\ʎM6z뿥MA>IENDB`PK }'VGL//)imgs/5400cbe10720481c814bced8ad030a0d.pngPNG  IHDRYdzTXtRaw profile type exifxڥir$vc^a9#/AJzjRdU&gE?}ZgML斳Ol7>xR{} Ϗ_5^syKBu~1n KЊz]. @VGz3'};`7, ?oBr%z7ݗ' Ʒ/g;3[ѿ^~9~}sҏ_zX_??ígE?Yg)z̄:Qwnp ݺm%[I),;ty2q\tuwܾ_,1m|5TC_w| -Pi6;ͽ[R︘S]ۿ߾s|ʂuy` eN22+?k IQV4;K A0AW[' k.$-d%A .%X!drSn[/c32B*$+DXB)JC9K(J4%\J^C5\K| fjV[ksΕ;Gq$3(6|fiYfmWXʫmJiǝvev? ēN>N̚{Ͽ"k53ϬR>.'I9#aDGƋR@A{VW3<]Ez#XԱ,[ weW .CZ'sO-!B=#vdBkiUnP%5\$Rkt.~Σ~Z`=eW^OU'5H~lx܎7ލXNg]_o˚3#ig0w9}l2O0g Qvㆽ𡎙y)XO3wOpq4C\(?>gQ2I>P@9T׫0Z%OL5d&ɯb)ڣPORD=Q뮑 (ZX2nG)u*EƣHJ3(:(,:X5wK~VNJ6}٣"Wh=XY4]!/άgo[$ e]ʉk{=zvfp<)i4TxdSa .'굩v(̷aɣ;beے5e6C&40%*((n_kH&9wѯX'UKdOeۨ7jJ#VWͤ0 [- sKJe׺f>3ө$9^˕SnxɩCi]S3o$L8Z'z7 "Vr#܍(D>^9Mes7W`!߾ˆP9@}~{|P)yYFOQ+*ά.q% ~xC$9iU:Z۬Z Z6D!FV+M#ǵ(!x 쓄RR M}xB Zj)DhD㊋GR^6tpnҖ!=!Zѥpd\GV‡Ly'UI`nZJe9z*bMvAčQj7j#=@m;~N{cYaW$²}IK>WmA3ෂP:5L,z3џ)= ?=pcЏ /d=΄HH6?3ܟ5_ D G~B"ߣzw2̘ Pw[Wl:exV\dxnl~}Lg-)+K`ೢΦQYaB ̠I0)or^u7( 6sw(RF4H<EY$`G,^D'+7['0~#51aD݂ghbzJ&:@،IE$%>_~;S&;ҝ2Y МK݈FɓCj=o4eW5+oʖp yn\ XZDVU{Mգg 5@/kLwoc8=!0F^N!m^OL> рY:ٜyro&LX*U4U  gezX=cUJ0?},44ʐ#Ԥvk(A 8a>~w?_pZvMf =%Bjct*IrsqhPO%}w\Ay"0|Q:jv$8y 0hآ|wd¦VpMbsw*,{9<\BIY'rPĝ *@󂙲Ti=hB9j3ZU,p-|lPoU LEbF8Kc~W lҴϟ=¡RS&0?VX!ހ_P%h2 <4##I5KP`44'_I+bfzrRCfA@b^ì$ĎFUL+,HQQUfھGz:ߋAA>އW|Y 0+L-YL~ŞOhBC68/\nBٙM+XwnW3AȽ̬&ڒ|o,@ͮu0uurxzRĄudA*+&$ 8" :O}ZI*pGl-f⩇6ON`{_A{ga2ZFfw$uzӑ@/ G6ýv̩O;Wjpv5Y0h+`\oR}؏LܘE+߰mdk*q& 蘂 "!hCݡ)..v.\IUhJ!7ͫ2~CbT6pr$Jq;3_@03[(Ywj75[: e&EݤjB#(.z#-!  pA/DZqJ8Py5@Cš=2ƨFJL)w'S.iLmd͊Ҙ?W3J&`zq|m%Z+ ƑOz:h\uB󅴩$dq3)[Gvڰ"Mēqk UHOwNV{1Yhy!iM7 V.޲N: WJ0@!_[-ړL2=O9 $~}SiA!&8yй:^S yw/k,ɚ>s'\ tMEn@)MjZR訅 %Iy}@-GMDA+@{Hvf36/G &E&>]jnYR5ŒHXE/9q/S,9oѻBTk]MP2}XG'ZDsWqla>-xiN$&S /92_'C2CȭmZ2tR[H~78/7f?Q;TrIaXa5 Ը3j넼Dnrx]2cz SOOn+ײAJ_ tvE[}jdRJ^Z~yݫ# ]\NJFa:* ٤ ߠNtNv<I􍑴{k"T"ՋtB~pJjyKHq??E̐x4ޛ[~bey<0Sh F?vUr"-SQjnqbutI$.qPZAZ{* !/)(=GR E8'|K `8:1:զ6nz(dKݦx? Yӯ]q# \ p4U2T1[u0cj}fad:?іgy^Gv,DӴ6 jHbzp2_@YB…ZkKS}DD'7lZԩRA߁Ca-'vFud4?_ޠnn#\ עi<;K6M# a o_G4yBbΨ4ɚ`Y> `qoc~ mӿt%`roB Í5#f͞~}wKkDIhI&,; T;h ʶMm%q*:0j4#G*nŽY|݃UobkB 2ꁾp5{7Lv:v$G ;GJǁl\ vM-h^cN-Y (DdsD>H{ iJ">{Vlkha%Ԍ/lR U[aYp,}#{ `}줻U|P I5m~9/)~];0m*;˖lQфԤda΃.r6Pׁt( ΔBPe=*D9*t=3,dR2;tok\bBԉ= ϫm!g}q Ґõhh QBL[ׁQ)eH#U߉ th ~"d[VHdIG J`9/TŚiiSg V8/LjБ:'2R^%|]y'UO1,+NzsgѺJ@H<άS Z]3YbtԱ%!3w[gI>nQ06.sRNuN'>F Pc:Ek^%>s)d_VsPH=!qW>Deݡ >6CIw({X3Swм!5MxfJ|;:ux!qt#:{\*ĄC{_hsD戕Nkjfb UEҤ#P=8fAK87>:X2k{C_hDd3&`zD֛&QV7M4C+#5'`vb-ku+dxH6VɒSq˱{zYH=h#!eHfkG9{@;LaåGz'W&0RGgjuB TrQiN[gr=Yn6,-Vݻl^,w3]oBU`:rcK(Eٸ3~GsIb:wr]nyC~AGd]ӱt^d=ҧ?>4E;qZ};eVD0C  6 n&GAaƕȝ+A؂erxy<5]IF}w ؜hxwQw,G;f}NbΥvHWrMY LM䴺>A'x;/#-Y@kCRbjLδY#}dZYJrdX: \6sh"[}Jo`fx^V{F_WEwmQۻWvڷU^P*ܩ/Ym#v7>F)tO|cFj{E+]MAv尣V0Fhh=sZԁՁӘD;1(:Xʈx^'sR'=gB1" zqiCCPICC profilex}=HPOSE*"v(␡:Yq*Bi+`?hҐ8 .κ: x_Rh8{BTgP5H'b.*^AD0(1SOf{ꥺ,?_) sL7, MKOfeI!>'7ď\]~\rXa#'. x8 9[j_*h+AKH"2ꨠ 15RL<v)r䪀c5?YtBqŶ?F.jmN3pu&0IzEm⺣{y%Cr$?-X-зέ} KZe{;={r] viTXtXML:com.adobe.xmp *PLTEormCCC(tRNS@fbKGDH pHYs  tIME5CIDATX]0 NbtC ;Lkˎ}:_!kj?e"''@C?Ci\p՗OvnN- Q؉- hdf+' FJڎhoMkСIv@FFϞ.>٦)OyHc@ېΝ.:fZɀY^iF'ֶN7i#\aunlIrPӨę%1%!ERY&s5nU0, P,,,477Kr!wԋnC+M؏L=d&~YIENDB`PK }'Vfſ5EMzl43ÝdjB=6 ;"bE/}ߔ޿;;*<*߉g=|WYs\,{C𷶯!)Wshm5l8Aޚ:FM\Va=ټq:{|DǙ=s4MUSkŢ45Uvr>^a]4t۲]3kUՕJѩs_kx~OHKKth '^e}9gk_|^ddžn.j+1uSY6m7ľbMYW5K=sI2Y=G[Vo?Jcs>e) ؔL/q.kSdÙ\Ϡ{(3s D߼@+!1"#%03@PkEbuRy#w;w;HRW][-5qO'd's*纣(/Ͽ9۷cR3*(9RڱR:QYqg;{jYd>^ jƤNOu+̷sחh6Im̿5 },mzjlW&,E3&'ůZ],뵯\VzKrdU5' `}`;]{ښZ_(F xjg' Fӑ'ʫyhyͥ3%%4NƌsHzm1M`U]h1rcݿo!ldtko-Wa]rjb{?/Rs2-f6o"Qy"wy1lV*`V-_= \e殳%ʤ Z.k&~X줳Io,zWjChpN@\z}h_̣{ GE*٭\FU˜e?,OB^,rE9$ U%c5Z18JCheP&(jag 酭$u2/V׬ZJʮE-4 'Eo 1ğk6/O)e|:${2,+<ɉY~EQZyN1I:x*^*cC& !]gHW^gtRX?)!1 Q"2ABa0@P?{(3RZ~RjGٜGR+Zz~z~⟳w4S;L}d(HWxJkcO-N4+3Jnb'tsԕc>Q1C-YcvEIJ.&ӫ69د %bHZ+EPR.LSN.یo9~)}ߕU3G]SY"R_RMlƢ^L_=(M:E%i3co͉Og'J*wB qNj&1ѵ#cERfX3|fJy"kg"*W4oHqʓQo'u. QY٫.7jJy+0Fx2؜KvʯF;,UI>ߓ;3;&bSN (H҆Hrt~9 eL6lIڹѽD9;:d-f=kfF~ľ$CQz9c`;A"`UVũ}5jvwLtg#;CGliKm'{#E CTUmo_2!1 "QA#2Raq03@BP?]ҳ΍v~ 6/:O:m.| ;k~'ko-m3maDi.JNs~&nۙa(uݻ2̾Xmi\:3:>'Uuu瘖+x|Ϧ_}IsA>s4QI%/Jʷ6(e>5g*X8lfVKb-C&j޷Pħh_t=/;e6[ms>5Gϼx!wն}9Egdƭs ~PCf}J% y4?+%?-j[F5xg0& fU6ݫ5Ml.&]R8HḚ<r3.1=-ؽ`mΩDNWM`Ȗ27 f-D:жrVSKYX" 5ljEfgh?14Ӎav+? VYۦL#%=59xv GL{3Sa+R~`Msef M(Q-jf4'U-b3oۓPZ\\4vcfY E Y%,YI00vXfrG6'9+6uHc qxP[x 1U`#} J)VV+r%):kOQ\!Ml̥B NabsoPKFm'>&wٌ_u`<{>qȕg~Cj4w-s?i~kR8Av'yݴfw;ׇV8T_39?fdN&D !"1AQ2a#34q RbBr$C0@PS?6.~ S)x9d-nhf1KFWozQ6W7fR_!ҬR`t|K S}ġߐ5z|GZ3򢋉{Pk,AZAm41I$O V=>]6H/,KIfkkZb1YBf lV*]=WVɱl@[Cj%t\Ll-n"Hȷ]=TM*?ebISj/xb.Dz[>UxqYeK!޾^I&"b^zïd,œO!ʙ:vUrK^~~ p|Yl1ȐH饨DsdM^*9JUoͩ D812m/Q3*[EqoCm6IU1Pǖc'Ͽ~ZAvnFG-ԁ3H_S,xmݙͶ-SdYxhj¼-@2/L]}b-V'4m fB0c)Mmn)̘xDaXK(030koiu FjFq q bc Bg ^`/ sxLm lbI-mz M2_,8ZҦg aְPy~Goiκ[-GuGQ~#K,&c[4DPgspW 71$L se}s1ϥ/bc16Bs l)d qL"EU7:,9q10o\X$F7WځnVi#׍c ܂k}bw҂ +ܜ+c*$kt!)[ڛiy2ٻjEK϶yH'-}cR1 FcCitZ2\?+״= ʣKybȈ3EF B:H%0`|%.\E;.G_}b0qďi@k9;XpYHdd߳J")M~WS:O6fCJ/g#j~ҨS#"zIS8@ȉ+i #URcE*L/~ϴTr|Yc̟mCH2x(ך?c^;5icY;#o_xoA,C҉5:I _gLqT뢃+XEWbaċ\eםcxXdD.бkPJ"1Ql4CZv#Dy |_-I͈&&]2eĸs1@9N+$eR;C'*6c Xh!n)tHfLa+#t OuxI0c q~vuX:{ZEJ[ʰwGk{jjnkzH\.˝ʬM(ڡ+,ǾV6F[i{ԑ xVPMSM27ev:Qр2Bc?>b:퟇wy-S7V|Cf TmkZώŶ٩%vw*HvaC`zJbPx:jXbqEi#ܨvҳHz1~5 %$yoEfZb9k~_`ih -/{gg)!1AQaq 0@P?!ŕTz~?w0"V[kt͐ݧaăyd{$,_P}7᜶ Oy긔b|Ͻ!~OH]TucRlV=7_,XR0],z¨dK,wŚjȗ pqoqUob,{TOP>hfG˖8 x s(%`Kߊ]Ccܡ7Plm)Кh| e89 >dA(:DLEquzx|KTg_ô/yhLvԬu -:-i/SM{Qr`[ P ͗H| 2YPhٍ[KeԮ^b۔ԝo믬¦L <%KP-`zڋCgNh0s/[Bb g-7tԴa8cA }]UwŪ~^&t947aB-W0DŽۥS0ͯA>"G%w\MY }W~NmW lbFқpa&П|.v :'5jUtS%ž)C bĚwOKpU݌FV*פjXt8},,'Ǭ19nq4b3@KG * bli!v7.j0t^\.8;]٨PO%,|`hׁ*}|/0"h\A:܏ޠ &ز5$Tj.\3`e姣NZZ Ua "8IHk6G2hVh 1'>5Xb0{[ݍ &JS;-o{  I -| ]mXup-j)BOw}b/@k-4!? t˯1=UÒb8я1J% Sr]@lOEYNMxxzRa >E9׈ ږӲ)LϘȸ!qN&pV^|̐FV;n,,cvbf0)Vdǭz]KCx:çzV,KL̀h]."pi.f~?o- ' Ni׽NQw,TGVMY#!"l($GQšrc7CLۅ|-*bQyQapaXRCpp<;㰩Y'0(判/A<3bhߠe}bx~n0܊@ I$I$I$HKM Pۧ5v %&nkYr8A2dx Ou9\,yBLTީ^:r=b2@WL)I:q3q`ǩg!n> ^*Tb \8dd%biWVUK̿NbZF5klkO{%I)vCڸ5ˋG0qjr\4X^bQr;n^*2v;d+li2;K',ÅVicj+"9?r1.eP%ȽEeGXmClHiR4veN$ CS#,)RrPIw9 %a$UGefW+eP*X1) JdIy 1hcsi/0u*%"/?23\wF43 ŊEF"2/zV9I߈3`=sgU'p]}2&%@GDlyK$0P 1^vk/~8Tp%~/iY; `SGX6ԩPpWM_& ׎ΚcK P|Noz\%Jl)!1AQaq 0@P?wj%:c((Sͺ438%T@ gу%BvrٰP5>P 4P(h|oY!Ms1p~G2j{T]*,ȄtmC%Q-"Rl f CPpAb}9!ۇqh@!`CWLR."nӕv- XX)25cN(84jOEn.OhWm(i9i֙,rmZ 犫0_ @OCjStCfvA{+2kNNŤ0goRSWJTn#0Ć0jcn Z?o&6HkV:ò58oTt  ve}U[1A"4-jh:Ѐ;lhd*lMkյE.=1mm 3᫴I"=.`?'rQ׌3o4no8&mZk.m nz3H!%`.SDӖrG _!N1fkry]S 3ubڀMrkPVY 0(n@ڄPȌT<.J;Cf(L7KA}6hVD AL7&Lu D^idk!Vx4=5*^>-PmdV,? 1uzx| T6f W oXU;''y#r [L! i 6`|(`ܡ̡EZPE;_'mW[  m0M'v +>d+FA~^>2 KjfpB7ho8NȜ뫼#p @@tX P-݂&\(5@MØJ`PVGk^$j=F)x!"!64M9Q BTeA*z&\P6Okn@AWzۗ M -G0 oMe7فXJ!Ec]ܜ>~kD/TptztB3J A^BRa'_D$Tkd94uCxj[g͒mڑ? RB,e*PiVf,'Vv,Qd޵y"gOA耣p y ۍ$=dLעk@Rh|eewuw6xPp@ ԛP&ÀFĒw+cku@ӎZɏT>c:'%$׸OLlzu~oU?(+C8Q >&(`P݈M"WI(g3cb;kikax8_A>pƒ`*(;̘Ib`MvDoA$pJA`DC@'>+wWDG>[ 9C>0SC.?KFD2VF ObEK?PK }'Vres/PK }'Vi18n/PK }'Vw<$ i18n/zh.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/de.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/es.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/fr.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/id.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/ja.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$i18n/ja-jph.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/ko.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/pl.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/uk.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$i18n/zh-hant.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/nl.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/it.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/hr.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/ru.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/pt.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/fi.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/tr.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/tk.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'Vw<$ i18n/en.json{ "vdr_df3231_lowpower": "vdr DF3231 LowPower", "extensionName": "vdr DF3231 LowPower", "extensionDescription": "", "BLOCK_1656602282019": "Initialiser DS3231", "BLOCK_1656594936925": "régler l'heure [heure] minute [minute] seconde [seconde] ", "BLOCK_1656595410179": "régler la date [date] mois [mois] année [annee] ", "BLOCK_1656595749942_MODE_0": "heure", "BLOCK_1656595749942_MODE_1": "minute", "BLOCK_1656595749942_MODE_2": "seconde", "BLOCK_1656595749942_MODE_3": "date", "BLOCK_1656595749942_MODE_4": "mois", "BLOCK_1656595749942_MODE_5": "annee", "BLOCK_1656595749942": "[mode] ", "BLOCK_1656596148335_MODE_0": "Heure formatée", "BLOCK_1656596148335_MODE_1": "Date formatée", "BLOCK_1656596148335": "[mode] ", "BLOCK_1656596600428_ALARM_0": "1", "BLOCK_1656596600428_ALARM_1": "2", "BLOCK_1656596600428_PINDIGIT_0": "D2", "BLOCK_1656596600428_PINDIGIT_1": "D3", "BLOCK_1656596600428_PINDIGIT_2": "D4", "BLOCK_1656596600428_PINDIGIT_3": "D5", "BLOCK_1656596600428_PINDIGIT_4": "D6", "BLOCK_1656596600428_PINDIGIT_5": "D7", "BLOCK_1656596600428_PINDIGIT_6": "D8", "BLOCK_1656596600428_MODE_0": "minute", "BLOCK_1656596600428_MODE_1": "heure", "BLOCK_1656596600428_MODE_2": "jour", "BLOCK_1656596600428": "Alarme n° [alarm] sur [pinDigit] à executer toutes les [i] [mode] ", "BLOCK_1656597084419": "Définir alarme n° [numero] le [jour] à [heure] : [minute] ", "cate_a925a78d": "vdr DF3231", "BLOCK_1656663686735_PINDIGIT_0": "D2", "BLOCK_1656663686735_PINDIGIT_1": "D3", "BLOCK_1656663686735": "Veille. Réveil à partir de [pinDigit] ", "BLOCK_1656663686984": "Veille 8s", "BLOCK_1656663687195": "Voltage solaire", "cate_4b4990e1": "Low Power" }PK }'V\\index.jsPK }'VY5m5m5\handlerProxy.jsPK }'V|src/PK }'Vccc src/index.jsPK }'V"v&&src/snippets.jsPK }'VI~ src/generators.jsPK }'V^CCsrc/arduinosources.jsPK }'VE@src/facepanels.jsPK }'V_[[@Asrc/exthandler.jsPK }'VNEEEFsrc/handlerProxy.jsPK }'V src/cates/PK }'V׌src/cates/cate_a925a78d/PK }'Vg src/cates/cate_a925a78d/index.jsPK }'Vsrc/cates/cate_4b4990e1/PK }'V t* src/cates/cate_4b4990e1/index.jsPK }'V nsrc/cates/index.jsPK }'VCd  !src/cates/cate_a925a78d/blocks.jsPK }'VZ99!ؽsrc/cates/cate_4b4990e1/blocks.jsPK }'V Psrc/langs/PK }'V&##xsrc/langs/zh.jsPK }'V&##src/langs/de.jsPK }'V&##src/langs/es.jsPK }'V&##hsrc/langs/fr.jsPK }'V&##src/langs/id.jsPK }'V&##src/langs/ja.jsPK }'V&##Xsrc/langs/ja-jph.jsPK }'V&##src/langs/ko.jsPK }'V&##src/langs/pl.jsPK }'V&##Lsrc/langs/uk.jsPK }'V&##src/langs/zh-hant.jsPK }'V&##src/langs/nl.jsPK }'V&##Asrc/langs/it.jsPK }'V&##$src/langs/hr.jsPK }'V&##+src/langs/ru.jsPK }'V&##13src/langs/pt.jsPK }'V&##:src/langs/fi.jsPK }'V&##Asrc/langs/tr.jsPK }'V&##!Isrc/langs/tk.jsPK }'V&##qPsrc/langs/en.jsPK }'ViiWsrc/langs/index.jsPK }'VG Z[manifest.jsonPK }'V Ubdata.bak/PK }'V<<|bdata.bak/ext.jsonPK }'Vo5L*`data.bak/categroy.jsonPK }'VgFFKdata.bak/block.jsonPK }'V)L udata.bak/translate.jsonPK }'V)L data.bak/facepanel.jsonPK }'Vimgs/PK }'VwP,,)imgs/98d512dcdecd49de87d221d760624838.pngPK }'VGL//)imgs/5400cbe10720481c814bced8ad030a0d.pngPK }'V