|
AB1805_RK
|
Class for using the AB1805/AM1805 RTC/watchdog chip. More...
#include <AB1805_RK.h>
Public Types | |
| enum | WakeReason { WakeReason::UNKNOWN, WakeReason::WATCHDOG, WakeReason::DEEP_POWER_DOWN, WakeReason::COUNTDOWN_TIMER, WakeReason::ALARM } |
| Return codes for getWakeReason() More... | |
Public Member Functions | |
| AB1805 (TwoWire &wire=Wire, uint8_t i2cAddr=0x69) | |
| Construct the AB1805 driver object. More... | |
| virtual | ~AB1805 () |
| Destructor. Not normally used as this object is typically a global object. | |
| void | setup (bool callBegin=true) |
| Call this from main setup() to initialize the library. More... | |
| void | loop () |
| Call this from main loop(). Should be called on every call to loop(). | |
| AB1805 & | withFOUT (pin_t pin) |
| Call this before AB1805::setup() to specify the pin connected to FOUT/nIRQ. More... | |
| bool | detectChip () |
| Checks the I2C bus to make sure there is an AB1805 present. More... | |
| bool | usingRCOscillator () |
| Check oscillator. More... | |
| bool | isRTCSet () |
| Returns true if the RTC has been set. More... | |
| WakeReason | getWakeReason () const |
| Gets the reason the device was reset or woken. For example, TIMER, ALARM, WATCHDOG, etc. More... | |
| bool | updateWakeReason () |
| Update the wake reason. This is needed after STOP mode System.sleep() More... | |
| bool | setWDT (int seconds=-1) |
| Set or reset the watchdog timer. More... | |
| bool | stopWDT () |
| Stops the watchdog timer. Useful before entering sleep mode. More... | |
| bool | resumeWDT () |
| Resumes watchdog with same settings as before. More... | |
| bool | getRtcAsTime (time_t &time) |
| Get the time from the RTC as a time_t. More... | |
| bool | getRtcAsTm (struct tm *timeptr) |
| Get the time from the RTC as a struct tm. More... | |
| bool | resetConfig (uint32_t flags=0) |
| Resets the configuration of the AB1805 to default settings. More... | |
| bool | interruptAtTime (time_t time) |
| Set an interrupt at a time in the future using a time_t. More... | |
| bool | interruptAtTm (struct tm *timeptr) |
| Set an interrupt at a time in the future using a struct tm *. More... | |
| bool | repeatingInterrupt (struct tm *timeptr, uint8_t rptValue) |
| Set a repeating interrupt. More... | |
| bool | clearRepeatingInterrupt () |
Clear repeating interrupt set with repeatingInterrupt() . More... | |
| bool | interruptCountdownTimer (int value, bool minutes) |
| Interrupt at a time in the future, either in minutes or seconds. More... | |
| bool | deepPowerDown (int seconds=30) |
| Enters deep power down reset mode, using the EN pin. More... | |
| bool | setCountdownTimer (int value, bool minutes) |
| Used internally by interruptCountdownTimer and deepPowerDown. More... | |
| bool | setTrickle (uint8_t diodeAndRout) |
| Enable trickle charging mode. More... | |
| bool | isVBATAboveMin () |
| Returns true if VBAT input is above minimum operating voltage (1.2V) More... | |
| bool | isVBATAboveBREF () |
| Returns true if VBAT input is above BREF voltage. More... | |
| bool | checkVBAT (uint8_t mask, bool &isAbove) |
| Checks VBAT status. More... | |
| bool | setRtcFromSystem () |
| Set the RTC from the system clock. More... | |
| bool | setRtcFromTime (time_t time, bool lock=true) |
| Sets the RTC from a time_t. More... | |
| bool | setRtcFromTm (const struct tm *timeptr, bool lock=true) |
| Sets the RTC from a time_t. More... | |
| bool | readRegister (uint8_t regAddr, uint8_t &value, bool lock=true) |
| Reads a AB1805 register (single byte) More... | |
| uint8_t | readRegister (uint8_t regAddr, bool lock=true) |
| Reads a AB1805 register (single byte) and returns it. More... | |
| bool | readRegisters (uint8_t regAddr, uint8_t *array, size_t num, bool lock=true) |
| Reads sequential registers. More... | |
| bool | writeRegister (uint8_t regAddr, uint8_t value, bool lock=true) |
| Writes a AB1805 register (single byte) More... | |
| bool | writeRegisters (uint8_t regAddr, const uint8_t *array, size_t num, bool lock=true) |
| Writes sequential AB1805 registers. More... | |
| bool | maskRegister (uint8_t regAddr, uint8_t andValue, uint8_t orValue, bool lock=true) |
| Writes a AB1805 register (single byte) with masking of existing value. More... | |
| bool | isBitClear (uint8_t regAddr, uint8_t bitMask, bool lock=true) |
| Returns true if a bit in a register is 0. More... | |
| bool | isBitSet (uint8_t regAddr, uint8_t bitMask, bool lock=true) |
| Returns true if a bit in a register is 1. More... | |
| bool | clearRegisterBit (uint8_t regAddr, uint8_t bitMask, bool lock=true) |
| Clear a bit in a register. More... | |
| bool | setRegisterBit (uint8_t regAddr, uint8_t bitMask, bool lock=true) |
| Sets a bit in a register. More... | |
| size_t | length () |
| Returns the length of the RTC RAM in bytes (always 256) | |
| bool | eraseRam (bool lock=true) |
| Erases the RTC RAM to 0x00 values. More... | |
| template<typename T > | |
| T & | get (size_t ramAddr, T &t) |
| Read from RTC RAM using EEPROM-style API. More... | |
| template<typename T > | |
| const T & | put (size_t ramAddr, const T &t) |
| Write from RTC RAM using EEPROM-style API. More... | |
| virtual bool | readRam (size_t ramAddr, uint8_t *data, size_t dataLen, bool lock=true) |
| Low-level read call. More... | |
| virtual bool | writeRam (size_t ramAddr, const uint8_t *data, size_t dataLen, bool lock=true) |
| Low-level write call. More... | |
Static Public Member Functions | |
| static String | tmToString (const struct tm *timeptr) |
| Utility function to convert a struct tm * to a readable string. More... | |
| static void | tmToRegisters (const struct tm *timeptr, uint8_t *array, bool includeYear) |
| Convert a struct tm to register values for the AB1805. More... | |
| static void | registersToTm (const uint8_t *array, struct tm *timeptr, bool includeYear) |
| Convert register values to a struct tm. More... | |
| static int | bcdToValue (uint8_t bcd) |
| Convert a bcd value (0x00-0x99) into an integer (0-99) | |
| static uint8_t | valueToBcd (int value) |
| Convert an integer value (0-99) into a bcd value (0x00 - 0x99) | |
Static Public Attributes | |
| static const uint32_t | RESET_PRESERVE_REPEATING_TIMER = 0x00000001 |
| When resetting registers, leave repeating timer settings intact. | |
| static const uint32_t | RESET_DISABLE_XT = 0x00000002 |
| When resetting registers, disable XT oscillator. | |
| static const int | WATCHDOG_MAX_SECONDS = 124 |
| Maximum value that can be passed to setWDT(). | |
| static const uint8_t | REG_HUNDREDTH = 0x00 |
| Hundredths of a second, 2 BCD digits. | |
| static const uint8_t | REG_SECOND = 0x01 |
| Seconds, 2 BCD digits, MSB is GP0. | |
| static const uint8_t | REG_MINUTE = 0x02 |
| Minutes, 2 BCD digits, MSB is GP1. | |
| static const uint8_t | REG_HOUR = 0x03 |
| Hours, GP2, GP3. | |
| static const uint8_t | REG_DATE = 0x04 |
| Day of month (1-31), 2 BCD digits, GP4, GP5. | |
| static const uint8_t | REG_MONTH = 0x05 |
| Month (1-12), 2 BCD digits, GP6 - GP8. | |
| static const uint8_t | REG_YEAR = 0x06 |
| Year (0-99), 2 BCD digits. | |
| static const uint8_t | REG_WEEKDAY = 0x07 |
| Weekday (0-6), GP9 - GP13. | |
| static const uint8_t | REG_HUNDREDTH_ALARM = 0x08 |
| Alarm on hundredths of a second (0-99), 2 BCD digits. | |
| static const uint8_t | REG_SECOND_ALARM = 0x09 |
| Alarm on seconds (0-59), 2 BCD digits, GP14. | |
| static const uint8_t | REG_MINUTE_ALARM = 0x0a |
| Alarm on minutes (0-59), 2 BCD digits, GP15. | |
| static const uint8_t | REG_HOUR_ALARM = 0x0b |
| Alarm on hour, GP16, GP17. | |
| static const uint8_t | REG_DATE_ALARM = 0x0c |
| Alarm on date (1-31), 2 BCD digits, GP18-GP19. | |
| static const uint8_t | REG_MONTH_ALARM = 0x0d |
| Alarm on month (1-12). 2 BCD digits, GP20-GP22. | |
| static const uint8_t | REG_WEEKDAY_ALARM = 0x0e |
| Alarm on day of week (0-6). GP23-GP27. | |
| static const uint8_t | REG_STATUS = 0x0f |
| Status register. | |
| static const uint8_t | REG_STATUS_CB = 0x80 |
| Status register century bit mask. | |
| static const uint8_t | REG_STATUS_BAT = 0x40 |
| Status register switched to VBAT bit mask. | |
| static const uint8_t | REG_STATUS_WDT = 0x20 |
| Status register watchdog timer enabled and triggered bit mask. | |
| static const uint8_t | REG_STATUS_BL = 0x10 |
| Status register battery voltage crossing bit mask. | |
| static const uint8_t | REG_STATUS_TIM = 0x08 |
| Status register countdown timer reaches 0 bit mask. | |
| static const uint8_t | REG_STATUS_ALM = 0x04 |
| Status register alarm register match bit mask. | |
| static const uint8_t | REG_STATUS_EX2 = 0x02 |
| Status register WDI interrupt bit mask. | |
| static const uint8_t | REG_STATUS_EX1 = 0x01 |
| Status register EXTI interrupt bit mask. | |
| static const uint8_t | REG_STATUS_DEFAULT = 0x00 |
| Status register, default. | |
| static const uint8_t | REG_CTRL_1 = 0x10 |
| Control register 1. | |
| static const uint8_t | REG_CTRL_1_STOP = 0x80 |
| Control register 1, stop clocking system. | |
| static const uint8_t | REG_CTRL_1_12_24 = 0x40 |
| Control register 1, 12/24 hour mode select (0 = 24 hour) | |
| static const uint8_t | REG_CTRL_1_OUTB = 0x20 |
| Control register 1, value for nIRQ2. | |
| static const uint8_t | REG_CTRL_1_OUT = 0x10 |
| Control register 1, value for FOUT/nIRQ. | |
| static const uint8_t | REG_CTRL_1_RSP = 0x08 |
| Control register 1, Reset polarity. | |
| static const uint8_t | REG_CTRL_1_ARST = 0x04 |
| Control register 1, Auto reset enable. | |
| static const uint8_t | REG_CTRL_1_PWR2 = 0x02 |
| Control register 1, PWW/nIRQ pull-down enable. | |
| static const uint8_t | REG_CTRL_1_WRTC = 0x01 |
| Control register 1, write RTC mode. | |
| static const uint8_t | REG_CTRL_1_DEFAULT = 0x13 |
| Control register 1, 0b00010011 (OUT | RSO | PWR2 | WRTC) | |
| static const uint8_t | REG_CTRL_2 = 0x11 |
| Control register 2. | |
| static const uint8_t | REG_CTRL_2_RS1E = 0x20 |
| Control register 2, nIRQ2 output mode. | |
| static const uint8_t | REG_CTRL_2_OUT2S_MASK = 0x1c |
| Control register 2, nIRQ2 output mode. | |
| static const uint8_t | REG_CTRL_2_OUT2S_nIRQ = 0x00 |
| Control register 2, nIRQ2 output mode, nIRQ or OUTB. | |
| static const uint8_t | REG_CTRL_2_OUT2S_SQW = 0x04 |
| Control register 2, nIRQ2 output mode, SQW or OUTB. | |
| static const uint8_t | REG_CTRL_2_OUT2S_nAIRQ = 0x0c |
| Control register 2, nIRQ2 output mode, nAIRQ or OUTB. | |
| static const uint8_t | REG_CTRL_2_OUT2S_TIRQ = 0x10 |
| Control register 2, nIRQ2 output mode, TIRQ or OUTB. | |
| static const uint8_t | REG_CTRL_2_OUT2S_nTIRQ = 0x14 |
| Control register 2, nIRQ2 output mode, nTIRQ or OUTB. | |
| static const uint8_t | REG_CTRL_2_OUT2S_SLEEP = 0x18 |
| Control register 2, nIRQ2 output mode, sleep mode. | |
| static const uint8_t | REG_CTRL_2_OUT2S_OUTB = 0x1c |
| Control register 2, nIRQ2 output mode, OUTB. | |
| static const uint8_t | REG_CTRL_2_OUT1S_MASK = 0x03 |
| Control register 2, FOUT/nIRQ output mode. | |
| static const uint8_t | REG_CTRL_2_OUT1S_nIRQ = 0x00 |
| Control register 2, FOUT/nIRQ output mode, nIRQ, or OUT. | |
| static const uint8_t | REG_CTRL_2_OUT1S_SQW = 0x01 |
| Control register 2, FOUT/nIRQ output mode, SQW or OUT. | |
| static const uint8_t | REG_CTRL_2_OUT1S_SQW_nIRQ = 0x02 |
| Control register 2, FOUT/nIRQ output mode, SQW, nIRQ, or OUT. | |
| static const uint8_t | REG_CTRL_2_OUT1S_nAIRQ = 0x03 |
| Control register 2, FOUT/nIRQ output mode, nIRQ or OUT. | |
| static const uint8_t | REG_CTRL_2_DEFAULT = 0x3c |
| Control register 2, 0b00111100 (OUT2S = OUTB) | |
| static const uint8_t | REG_INT_MASK = 0x12 |
| Interrupt mask. | |
| static const uint8_t | REG_INT_MASK_CEB = 0x80 |
| Interrupt mask, century enable. | |
| static const uint8_t | REG_INT_MASK_IM = 0x60 |
| Interrupt mask, interrupt mode bits (2 bits) | |
| static const uint8_t | REG_INT_MASK_BLIE = 0x10 |
| Interrupt mask, battery low interrupt enable. | |
| static const uint8_t | REG_INT_MASK_TIE = 0x08 |
| Interrupt mask, timer interrupt enable. | |
| static const uint8_t | REG_INT_MASK_AIE = 0x04 |
| Interrupt mask, alarm interrupt enable. | |
| static const uint8_t | REG_INT_MASK_EX2E = 0x02 |
| Interrupt mask, XT2 interrupt enable. | |
| static const uint8_t | REG_INT_MASK_EX1E = 0x01 |
| Interrupt mask, XT1 interrupt enable. | |
| static const uint8_t | REG_INT_MASK_DEFAULT = 0xe0 |
| Interrupt mask, default 0b11100000 (CEB | IM=1/4 seconds) | |
| static const uint8_t | REG_SQW = 0x13 |
| Square wave output control. | |
| static const uint8_t | REG_SQW_SQWE = 0x80 |
| Square wave output control, enable. | |
| static const uint8_t | REG_SQW_DEFAULT = 0x26 |
| Square wave output control, default 0b00100110. | |
| static const uint8_t | REG_CAL_XT = 0x14 |
| Calibration for the XT oscillator. | |
| static const uint8_t | REG_CAL_RC_HIGH = 0x15 |
| Calibration for the RC oscillator, upper 8 bits. | |
| static const uint8_t | REG_CAL_RC_LOW = 0x16 |
| Calibration for the RC oscillator, lower 8 bits. | |
| static const uint8_t | REG_SLEEP_CTRL = 0x17 |
| Power control system sleep function. | |
| static const uint8_t | REG_SLEEP_CTRL_SLP = 0x80 |
| Sleep control, enter sleep mode. | |
| static const uint8_t | REG_SLEEP_CTRL_SLRES = 0x40 |
| Sleep control, nRST low on sleep. | |
| static const uint8_t | REG_SLEEP_CTRL_EX2P = 0x20 |
| Sleep control, XT2 on rising WDI. | |
| static const uint8_t | REG_SLEEP_CTRL_EX1P = 0x10 |
| Sleep control, XT1 on rising EXTI. | |
| static const uint8_t | REG_SLEEP_CTRL_SLST = 0x08 |
| Sleep control, set when sleep has occurred. | |
| static const uint8_t | REG_SLEEP_CTRL_SLTO_MASK = 0x07 |
| Sleep control, number of 7.8ms periods before sleep. | |
| static const uint8_t | REG_SLEEP_CTRL_DEFAULT = 0x00 |
| Sleep control default (0b00000000) | |
| static const uint8_t | REG_TIMER_CTRL = 0x18 |
| Countdown timer control. | |
| static const uint8_t | REG_TIMER_CTRL_TE = 0x80 |
| Countdown timer control, timer enable. | |
| static const uint8_t | REG_TIMER_CTRL_TM = 0x40 |
| Countdown timer control, timer interrupt mode. | |
| static const uint8_t | REG_TIMER_CTRL_TRPT = 0x20 |
| Countdown timer control, timer repeat function. | |
| static const uint8_t | REG_TIMER_CTRL_RPT_MASK = 0x1c |
| Countdown timer control, repeat function. | |
| static const uint8_t | REG_TIMER_CTRL_RPT_HUN = 0x1c |
| Countdown timer control, repeat hundredths match (7) | |
| static const uint8_t | REG_TIMER_CTRL_RPT_SEC = 0x18 |
| Countdown timer control, repeat hundredths, seconds match (once per minute) (6) | |
| static const uint8_t | REG_TIMER_CTRL_RPT_MIN = 0x14 |
| Countdown timer control, repeat hundredths, seconds, minutes match (once per hour) (5) | |
| static const uint8_t | REG_TIMER_CTRL_RPT_HOUR = 0x10 |
| Countdown timer control, repeat hundredths, seconds, minutes, hours match (once per day) (4) | |
| static const uint8_t | REG_TIMER_CTRL_RPT_WKDY = 0x0c |
| Countdown timer control, repeat hundredths, seconds, minutes, hours, weekday match (once per week) (3) | |
| static const uint8_t | REG_TIMER_CTRL_RPT_DATE = 0x08 |
| Countdown timer control, repeat hundredths, seconds, minutes, hours, date match (once per month) (2) | |
| static const uint8_t | REG_TIMER_CTRL_RPT_MON = 0x04 |
| Countdown timer control, repeat hundredths, seconds, minutes, hours, date, month match (once per year) (1) | |
| static const uint8_t | REG_TIMER_CTRL_RPT_DIS = 0x00 |
| Countdown timer control, alarm disabled (0) | |
| static const uint8_t | REG_TIMER_CTRL_TFS_MASK = 0x03 |
| Countdown timer control, clock frequency. | |
| static const uint8_t | REG_TIMER_CTRL_TFS_FAST = 0x00 |
| Countdown timer control, clock frequency 4.096 kHz or 128 Hz. | |
| static const uint8_t | REG_TIMER_CTRL_TFS_64 = 0x01 |
| Countdown timer control, clock frequency 64 Hz. | |
| static const uint8_t | REG_TIMER_CTRL_TFS_1 = 0x02 |
| Countdown timer control, clock frequency 1 Hz. | |
| static const uint8_t | REG_TIMER_CTRL_TFS_1_60 = 0x03 |
| Countdown timer control, clock frequency 1/60 Hz (1 minute) | |
| static const uint8_t | REG_TIMER_CTRL_DEFAULT = 0x23 |
| Countdown timer control, 0b00100011 (TFPT + TFS = 1/60 Hz0) | |
| static const uint8_t | REG_TIMER = 0x19 |
| Countdown timer current value register. | |
| static const uint8_t | REG_TIMER_DEFAULT = 0x00 |
| Countdown timer current value register default value (0x00) | |
| static const uint8_t | REG_TIMER_INITIAL = 0x1a |
| Countdown timer inital (reload) value register. | |
| static const uint8_t | REG_TIMER_INITIAL_DEFAULT = 0x00 |
| Countdown timer inital value register default value. | |
| static const uint8_t | REG_WDT = 0x1b |
| Watchdog timer control register. | |
| static const uint8_t | REG_WDT_RESET = 0x80 |
| Watchdog timer control, enable reset (1) or WIRQ (0) | |
| static const uint8_t | REG_WDT_WRB_16_HZ = 0x00 |
| Watchdog timer control, WRB watchdog clock = 16 Hz. | |
| static const uint8_t | REG_WDT_WRB_4_HZ = 0x01 |
| Watchdog timer control, WRB watchdog clock = 4 Hz. | |
| static const uint8_t | REG_WDT_WRB_1_HZ = 0x02 |
| Watchdog timer control, WRB watchdog clock = 1 Hz. | |
| static const uint8_t | REG_WDT_WRB_1_4_HZ = 0x03 |
| Watchdog timer control, WRB watchdog clock = 1/4 Hz. | |
| static const uint8_t | REG_WDT_DEFAULT = 0x00 |
| Watchdog timer control, default value. | |
| static const uint8_t | REG_OSC_CTRL = 0x1c |
| Oscillator control register. | |
| static const uint8_t | REG_OSC_CTRL_OSEL = 0x80 |
| Oscillator control, clock select 32.768 kHz (0) or 128 Hz (1) | |
| static const uint8_t | REG_OSC_CTRL_ACAL = 0x60 |
| Oscillator control, auto-calibration. | |
| static const uint8_t | REG_OSC_CTRL_AOS = 0x10 |
| Oscillator control, automatic switch to RC oscillator on battery. | |
| static const uint8_t | REG_OSC_CTRL_FOS = 0x08 |
| Oscillator control, automatic switch to RC oscillator on failure. | |
| static const uint8_t | REG_OSC_CTRL_PWGT = 0x04 |
| Oscillator control, IO interface disable. | |
| static const uint8_t | REG_OSC_CTRL_OFIE = 0x02 |
| Oscillator control, oscillator fail interrupt enable. | |
| static const uint8_t | REG_OSC_CTRL_ACIE = 0x01 |
| Oscillator control, auto-calibration fail interrupt enable. | |
| static const uint8_t | REG_OSC_CTRL_DEFAULT = 0x00 |
| Oscillator control, default value. | |
| static const uint8_t | REG_OSC_STATUS = 0x1d |
| Oscillator status register. | |
| static const uint8_t | REG_OSC_STATUS_XTCAL = 0x0c |
| Oscillator status register, extended crystal calibration. | |
| static const uint8_t | REG_OSC_STATUS_LKO2 = 0x04 |
| Oscillator status register, lock OUT2. | |
| static const uint8_t | REG_OSC_STATUS_OMODE = 0x01 |
| Oscillator status register, oscillator mode (read-only) | |
| static const uint8_t | REG_OSC_STATUS_OF = 0x02 |
| Oscillator status register, oscillator failure. | |
| static const uint8_t | REG_OSC_STATUS_ACF = 0x01 |
| Oscillator status register, auto-calibration failure. | |
| static const uint8_t | REG_CONFIG_KEY = 0x1f |
| Register to set to modify certain other keys. | |
| static const uint8_t | REG_CONFIG_KEY_OSC_CTRL = 0xa1 |
| Configuration key, enable setting REG_OSC_CTRL. | |
| static const uint8_t | REG_CONFIG_KEY_SW_RESET = 0x3c |
| Configuration key, software reset. | |
| static const uint8_t | REG_CONFIG_KEY_OTHER = 0x9d |
| Configuration key, REG_TRICKLE, REG_BREF_CTRL, REG_AFCTRL, REG_BATMODE_IO, REG_OCTRL. | |
| static const uint8_t | REG_TRICKLE = 0x20 |
| Trickle charger control register. | |
| static const uint8_t | REG_TRICKLE_DEFAULT = 0x00 |
| Trickle charger control register, default value. | |
| static const uint8_t | REG_TRICKLE_TCS_MASK = 0xf0 |
| Trickle charger control register, enable mask. | |
| static const uint8_t | REG_TRICKLE_TCS_ENABLE = 0xa0 |
| Trickle charger control register, enable value (0b10100000) | |
| static const uint8_t | REG_TRICKLE_DIODE_MASK = 0x0c |
| Trickle charger control register, diode mask. | |
| static const uint8_t | REG_TRICKLE_DIODE_0_6 = 0x08 |
| Trickle charger control register, diode 0.6V drop. | |
| static const uint8_t | REG_TRICKLE_DIODE_0_3 = 0x04 |
| Trickle charger control register, diode 0.3V drop. | |
| static const uint8_t | REG_TRICKLE_ROUT_MASK = 0x03 |
| Trickle charger control register, rout mask. | |
| static const uint8_t | REG_TRICKLE_ROUT_11K = 0x03 |
| Trickle charger control register, rout 11K. | |
| static const uint8_t | REG_TRICKLE_ROUT_6K = 0x02 |
| Trickle charger control register, rout 6K. | |
| static const uint8_t | REG_TRICKLE_ROUT_3K = 0x01 |
| Trickle charger control register, rout 3K. | |
| static const uint8_t | REG_TRICKLE_ROUT_DISABLE = 0x00 |
| Trickle charger control register, rout disable. | |
| static const uint8_t | REG_BREF_CTRL = 0x21 |
| Wakeup control system reference voltages. | |
| static const uint8_t | REG_BREF_CTRL_DEFAULT = 0xf0 |
| Wakeup control system default 0b11110000. | |
| static const uint8_t | REG_BREF_CTRL_25_30 = 0x70 |
| Wakeup control falling 2.5V rising 3.0V. | |
| static const uint8_t | REG_BREF_CTRL_21_25 = 0xb0 |
| Wakeup control falling 2.1V rising 2.5V. | |
| static const uint8_t | REG_BREF_CTRL_18_22 = 0xd0 |
| Wakeup control falling 1.8V rising 2.2V. | |
| static const uint8_t | REG_BREF_CTRL_14_16 = 0xf0 |
| Wakeup control falling 1.4V rising 1.6V, default value. | |
| static const uint8_t | REG_AFCTRL = 0x26 |
| Auto-calibration filter capacitor enable register. | |
| static const uint8_t | REG_AFCTRL_ENABLE = 0xa0 |
| Auto-calibration filter capacitor enable. | |
| static const uint8_t | REG_AFCTRL_DISABLE = 0x00 |
| Auto-calibration filter capacitor disable. | |
| static const uint8_t | REG_AFCTRL_DEFAULT = 0x00 |
| Auto-calibration filter, default. | |
| static const uint8_t | REG_BATMODE_IO = 0x27 |
| Brownout control for IO interface. | |
| static const uint8_t | REG_BATMODE_IO_DEFAULT = 0x80 |
| Brownout control for IO interface, default value. | |
| static const uint8_t | REG_BATMODE_IO_IOBM = 0x80 |
| Brownout control for IO interface, enable IO when on VBAT. | |
| static const uint8_t | REG_ID0 = 0x28 |
| Part number, upper (read-only) | |
| static const uint8_t | REG_ID0_AB08XX = 0x18 |
| Part number, upper, AB08xx. | |
| static const uint8_t | REG_ID0_AB18XX = 0x18 |
| Part number, upper, AB18xx. | |
| static const uint8_t | REG_ID1 = 0x29 |
| Part number, lower (read-only) | |
| static const uint8_t | REG_ID1_ABXX05 = 0x05 |
| Part number, lower, AB1805 or AB0805 (I2C) | |
| static const uint8_t | REG_ID1_ABXX15 = 0x05 |
| Part number, lower, AB1815 or AB0815 (SPI) | |
| static const uint8_t | REG_ID2 = 0x2a |
| Part revision (read-only) | |
| static const uint8_t | REG_ID3 = 0x2b |
| Lot number, lower (read-only) | |
| static const uint8_t | REG_ID4 = 0x2c |
| Manufacturing unique ID upper (read-only) | |
| static const uint8_t | REG_ID5 = 0x2d |
| Manufacturing unique ID lower (read-only) | |
| static const uint8_t | REG_ID6 = 0x2e |
| Lot and wafer information (read-only) | |
| static const uint8_t | REG_ASTAT = 0x2f |
| Analog status register (read-only) | |
| static const uint8_t | REG_ASTAT_BBOD = 0x80 |
| Analog status register. VBAT is above BREF (read-only) | |
| static const uint8_t | REG_ASTAT_BMIN = 0x40 |
| Analog status register. VBAT is above minimum operating voltage 1.2V (read-only) | |
| static const uint8_t | REG_ASTAT_VINIT = 0x02 |
| Analog status register. VCC is about minimum 1.6V (read-only) | |
| static const uint8_t | REG_OCTRL = 0x30 |
| Output control register at power-down. | |
| static const uint8_t | REG_OCTRL_WDBM = 0x80 |
| Output control register, WDI enabled when powered from VBAT. | |
| static const uint8_t | REG_OCTRL_EXBM = 0x40 |
| Output control register, EXTI enabled when powered from VBAT. | |
| static const uint8_t | REG_OCTRL_WDDS = 0x20 |
| Output control register, WDI disabled in sleep. | |
| static const uint8_t | REG_OCTRL_EXDS = 0x10 |
| Output control register, EXTI disabled in sleep. | |
| static const uint8_t | REG_OCTRL_RSEN = 0x08 |
| Output control register, nRST output enabled in sleep. | |
| static const uint8_t | REG_OCTRL_O4EN = 0x04 |
| Output control register, CLKOUT/nIRQ3 enabled in sleep. | |
| static const uint8_t | REG_OCTRL_O3EN = 0x02 |
| Output control register, nTIRQ enabled in sleep. | |
| static const uint8_t | REG_OCTRL_O1EN = 0x01 |
| Output control register, FOUT/nIRQ enabled in sleep. | |
| static const uint8_t | REG_OCTRL_DEFAULT = 0x00 |
| Output control register, default. | |
| static const uint8_t | REG_EXT_ADDR = 0x3f |
| Extension RAM address. | |
| static const uint8_t | REG_EXT_ADDR_O4MB = 0x80 |
| Extension RAM address, CLKOUT/nIRQ3 enabled when powered from VBAT. | |
| static const uint8_t | REG_EXT_ADDR_BPOL = 0x40 |
| Extension RAM address, BL polarity. | |
| static const uint8_t | REG_EXT_ADDR_WDIN = 0x20 |
| Extension RAM address, level of WDI pin (read-only) | |
| static const uint8_t | REG_EXT_ADDR_EXIN = 0x10 |
| Extension RAM address, level of EXTI pin (read-only) | |
| static const uint8_t | REG_EXT_ADDR_XADA = 0x04 |
| Extension RAM address, Upper bit of alternate RAM address. | |
| static const uint8_t | REG_EXT_ADDR_XADS = 0x03 |
| Extension RAM address, Upper 2 bits of standard RAM address. | |
| static const uint8_t | REG_RAM = 0x40 |
| Standard RAM. | |
| static const uint8_t | REG_ALT_RAM = 0x80 |
| Alternate RAM address. | |
Protected Member Functions | |
| void | systemEvent (system_event_t event, int param) |
| Internal function used to handle system events. More... | |
Static Protected Member Functions | |
| static void | systemEventStatic (system_event_t event, int param) |
| Static function passed to System.on. More... | |
Protected Attributes | |
| TwoWire & | wire = Wire |
| Which I2C (TwoWire) interface to use. Usually Wire, is Wire1 on Tracker SoM. | |
| uint8_t | i2cAddr = 0x69 |
| I2C address, always 0x69 as that is the address hardwired in the AB1805. | |
| pin_t | foutPin = PIN_INVALID |
| Which GPIO is connected to FOUT/nIRQ. More... | |
| int | watchdogSecs = 0 |
| Watchdog period in seconds (1 <= watchdogSecs <= 124) or 0 for disabled. More... | |
| unsigned long | lastWatchdogMillis = 0 |
| The last millis() value where we called setWDT(-1) | |
| unsigned long | watchdogUpdatePeriod = 0 |
| How often to call updateWDT(-1) in milliseconds. | |
| bool | timeSet = false |
| True if we've set the RTC from the cloud time. | |
| WakeReason | wakeReason = WakeReason::UNKNOWN |
| The reason for wake. Set during setup() | |
Static Protected Attributes | |
| static AB1805 * | instance = 0 |
| Singleton for AB1805. Set in constructor. | |
Class for using the AB1805/AM1805 RTC/watchdog chip.
You typically allocate one of these objects as a global variable as a singleton. You can only have one of these objects per device.
Be sure you call the setup() and loop() methods of the AB1805 object!
|
strong |
Return codes for getWakeReason()
| Enumerator | |
|---|---|
| UNKNOWN | Wake reason is not know (may be from something other than RTC) |
| WATCHDOG | Watchdog trigged reset. |
| DEEP_POWER_DOWN | The deepPowerDown() function was used (RTC was in sleep mode) |
| COUNTDOWN_TIMER | The interruptCountdownTimer() was used. |
| ALARM | RTC clock alarm (periodic or single) trigged wake. |
| AB1805::AB1805 | ( | TwoWire & | wire = Wire , |
| uint8_t | i2cAddr = 0x69 |
||
| ) |
Construct the AB1805 driver object.
| wire | The I2C (TwoWire) inteface to use. Usually Wire . |
| i2cAddr | The I2C address. This is always 0x69 on the AB1805 as the address is not configurable. |
You typically allocate one of these objects as a global variable as a singleton. You can only have one of these objects per device.
| bool AB1805::checkVBAT | ( | uint8_t | mask, |
| bool & | isAbove | ||
| ) |
Checks VBAT status.
| mask | Either REG_ASTAT_BBOD (compare againt BREF) or REG_ASTAT_BMIN (compare against minimum, 1.2V) |
| isAbove | True if VBAT is above the specified voltage, or false if not |
This function will check if trickle charging is enabled first. If enabled, it will be turned off, the value checked, then turned back on again.
| bool AB1805::clearRegisterBit | ( | uint8_t | regAddr, |
| uint8_t | bitMask, | ||
| bool | lock = true |
||
| ) |
Clear a bit in a register.
| regAddr | The address of the register to read/write |
| bitMask | The bit mask to clear. This has a 1 bit in the bit you want to clear, and will typically only have one bit set, though you can clear multiple bits at the same time with this function. |
| lock | Whether to lock the I2C bus, the default is true. You pass false if you are grouping together functions in a single lock, for example doing a read/modify/write cycle. |
The bit is cleared only if set. If the bit(s) are already cleared, then only the read is done, and the write is skipped. A read is always done.
If lock is true, then the lock surround both the read and write so the entire operation is atomic.
| bool AB1805::clearRepeatingInterrupt | ( | ) |
Clear repeating interrupt set with repeatingInterrupt()
.
| bool AB1805::deepPowerDown | ( | int | seconds = 30 | ) |
Enters deep power down reset mode, using the EN pin.
| seconds | number of seconds to power down. Must be 0 < seconds <= 255. The default is 30 seconds. If time-sensitive, 10 seconds is probably sufficient. |
This method powers down the MCU and cellular modem by using a combination of the EN and RST pins. This super-reset is similar to what would happen if you disconnected the battery.
It assumes that EN is connected to /nIRQ2 (PSW) on the AB1805 using an N-channel MOSFET and RST is connected to /RESET on the AB1805.
After the deep reset finishes, the device will reboot and go back through setup() again. Calling getWakeReset() will return the reason DEEP_POWER_DOWN
.
This works even if the RTC has not been set yet.
| bool AB1805::detectChip | ( | ) |
Checks the I2C bus to make sure there is an AB1805 present.
This is called during AB1805::setup().
| bool AB1805::eraseRam | ( | bool | lock = true | ) |
Erases the RTC RAM to 0x00 values.
Erases the RTC RAM to 0x00.
| lock | Whether to lock the I2C bus, the default is true. You pass false if you are grouping together functions in a single lock, for example doing a read/modify/write cycle. |
|
inline |
Read from RTC RAM using EEPROM-style API.
| ramAddr | The address in the RTC RAM to read from |
| t | The variable to read to. This must be a simple type (bool, int, float, etc.) or struct. It cannot save a c-string (const char *), String, or other class. You typically cannot get any pointers or structs containing pointers. |
| bool AB1805::getRtcAsTime | ( | time_t & | time | ) |
Get the time from the RTC as a time_t.
| time | Filled in with the number of second since January 1, 1970 UTC. |
The time value is basically the same as what would be returned from Time.now()
except it's retrieved from the AB1805 RTC instead of the system. However both should approximately equal to each other.
| bool AB1805::getRtcAsTm | ( | struct tm * | timeptr | ) |
Get the time from the RTC as a struct tm.
| timeptr | pointer to struct tm. Filled in with the current time, UTC. |
Note: This uses mktime, which technically is local time, not UTC. However, the standard library is set at UTC as the local time. Using Time.zone() changes the timezone in the Time
class but does not modifying the underling standard C library, so mktime should always be UTC.
The fields of the timeptr are:
|
inline |
Gets the reason the device was reset or woken. For example, TIMER, ALARM, WATCHDOG, etc.
This is set during AB1805::setup() automatically (for HIBERNATE, ULP, and SLEEP_MODE_DEEP) as well as normal reset, however if you are using STOP mode sleep, you must call updateWakeReason()
after System.sleep() returns to update the wake reason.
| bool AB1805::interruptAtTime | ( | time_t | time | ) |
Set an interrupt at a time in the future using a time_t.
| time | The number of second after January 1, 1970 UTC. |
This causes an interrupt on FOUT/nIRQ in the future. It will execute once. This can only be done if the RTC has been programmed with the current time, which it normally gets from the cloud at startup.
There can only be one interrupt set. Setting at one-time or repeating interrupt removes any previously set interrupt time.
| bool AB1805::interruptAtTm | ( | struct tm * | timeptr | ) |
Set an interrupt at a time in the future using a struct tm *.
| timeptr | pointer to struct tm. This specifies the time (UTC). |
This causes an interrupt on FOUT/nIRQ in the future. It will execute once. This can only be done if the RTC has been programmed with the current time, which it normally gets from the cloud at startup.
Only the tm_sec, tm_min, tm_hour, tm_mday, tm_mon, and tm_year are used. The tm_wday field is ignored. Note that tm_mon is 0-11, not 1-12.
There can only be one interrupt set. Setting at one-time or repeating interrupt removes any previously set interrupt time.
The fields of the timeptr are:
| bool AB1805::interruptCountdownTimer | ( | int | value, |
| bool | minutes | ||
| ) |
Interrupt at a time in the future, either in minutes or seconds.
| value | Value in seconds or minutes. Must be 0 < value <= 255! |
| minutes | True if minutes, false if seconds |
The countdown timer works even if the RTC has not been set yet, but is more limited in range (maximum: 255 minutes).
| bool AB1805::isBitClear | ( | uint8_t | regAddr, |
| uint8_t | bitMask, | ||
| bool | lock = true |
||
| ) |
Returns true if a bit in a register is 0.
| regAddr | Register address to read from (0x00 - 0xff) |
| bitMask | Mask to check. Note that the bitMask should have a 1 bit where you are checking for a 0 bit! Normally there is only one bit set in bitMask. |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
| bool AB1805::isBitSet | ( | uint8_t | regAddr, |
| uint8_t | bitMask, | ||
| bool | lock = true |
||
| ) |
Returns true if a bit in a register is 1.
| regAddr | Register address to read from (0x00 - 0xff) |
| bitMask | Mask to check. The bitMask should have a 1 bit where you are checking for a 1 bit. Normally there is only one bit set in bitMask. |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
|
inline |
Returns true if the RTC has been set.
On cold power-up before cloud connecting, this will be false. Note that
|
inline |
Returns true if VBAT input is above BREF voltage.
The power-up default for BREF is 1.4V (REG_BREF_CTRL_14_16
), so this provides some additional margin over the minimum voltage (1.2V). BREF can be changed to check for higher voltages (fully charged, for example) but it takes several seconds for the values to settle after making a change, so you don't want to change it too often.
This function will check if trickle charging is enabled first. If enabled, it will be turned off, the value checked, then turned back on again.
|
inline |
Returns true if VBAT input is above minimum operating voltage (1.2V)
This function will check if trickle charging is enabled first. If enabled, it will be turned off, the value checked, then turned back on again.
| bool AB1805::maskRegister | ( | uint8_t | regAddr, |
| uint8_t | andValue, | ||
| uint8_t | orValue, | ||
| bool | lock = true |
||
| ) |
Writes a AB1805 register (single byte) with masking of existing value.
| regAddr | Register address to read from and write to (0x00 - 0xff) |
| andValue | The existing register values is logically ANDed with this value |
| orValue | This value is logically ORed with this value before storing |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
If lock is true then the lock surrounds both the read and write, so the operation is atomic.
If the value is unchanged after the andValue and orValue is applied, the write is skipped. The read is always done.
|
inline |
Write from RTC RAM using EEPROM-style API.
| ramAddr | The address in the RTC RAM to write to |
| t | The variable to write from. t is not modified. This must be a simple type (bool, int, float, etc.) or struct. It cannot save a c-string (const char *), String, or other class. You typically cannot save any pointers or structs containing pointers. |
|
virtual |
Low-level read call.
| ramAddr | The address in the RTC RAM to read from |
| data | The buffer to read into |
| dataLen | The number of bytes to read |
| lock | Whether to lock the I2C bus, the default is true. You pass false if you are grouping together functions in a single lock, for example doing a read/modify/write cycle. |
The dataLen can be larger than the maximum I2C read. Multiple reads will be done if necessary. However do not read past the end of RAM (address 255).
| ramAddr | The address in the RTC RAM to read from |
| data | The buffer to read into |
| dataLen | The number of bytes to read |
The dataLen can be larger than the maximum I2C read. Multiple reads will be done if necessary.
| uint8_t AB1805::readRegister | ( | uint8_t | regAddr, |
| bool | lock = true |
||
| ) |
Reads a AB1805 register (single byte) and returns it.
| regAddr | Register address to read from (0x00 - 0xff) |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
There is an overload that takes a uint8_t &value parameter which is generally better because you can tell the difference between a value of 0 and a failure (false is returned).
| bool AB1805::readRegister | ( | uint8_t | regAddr, |
| uint8_t & | value, | ||
| bool | lock = true |
||
| ) |
Reads a AB1805 register (single byte)
| regAddr | Register address to read from (0x00 - 0xff) |
| value | Filled in with the value from the register |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
There is also an overload that returns value instead of passing it by reference.
| bool AB1805::readRegisters | ( | uint8_t | regAddr, |
| uint8_t * | array, | ||
| size_t | num, | ||
| bool | lock = true |
||
| ) |
Reads sequential registers.
| regAddr | Register address to start reading from (0x00 - 0xff) |
| array | Array of uint8_t values, filled in by this call |
| num | Number of registers to read |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
Reads a number of registers at once. This is done when reading the RTC value so it's atomic (counters will not be incremented in the middle of a read). Also used for reading the device RAM.
Do not read past address 0xff.
|
static |
Convert register values to a struct tm.
| array | Pointer to an array of values from the AB1805. Point to the seconds (not hundredths). |
| timeptr | Pointer to a struct tm to hold the converted time |
| includeYear | True if this is the the year should be included (time setting), or false if the year should not be included (alarm setting). |
| bool AB1805::repeatingInterrupt | ( | struct tm * | timeptr, |
| uint8_t | rptValue | ||
| ) |
Set a repeating interrupt.
| timeptr | pointer to struct tm. This specifies the time (UTC). |
| rptValue | a constant for which fields of timeptr are used. |
This causes an interrupt on FOUT/nIRQ in the future, repeating. This can only be done if the RTC has been programmed with the current time, which it normally gets from the cloud at startup.
REG_TIMER_CTRL_RPT_SEC
tm_sec matches (once per minute)REG_TIMER_CTRL_RPT_MIN
tm_sec, tm_min match (once per hour)REG_TIMER_CTRL_RPT_HOUR
tm_sec, tm_min, tm_hour match (once per day)REG_TIMER_CTRL_RPT_WKDY
tm_sec, tm_min, tm_hour, tm_wday match (once per week)REG_TIMER_CTRL_RPT_DATE
tm_sec, tm_min, tm_hour, tm_mday match (once per month)REG_TIMER_CTRL_RPT_MON
tm_sec, tm_min, tm_hour, tm_mday, tm_mon match (once per year)Note that tm_mon (month) is 0 - 11, not 1 - 12!
There can only be one interrupt set. Setting at one-time or repeating interrupt removes any previously set interrupt time.
If you reset the AB1805 configuration using resetConfig()
, the repeating timer will be cleared, unless you add the AB1805::RESET_PRESERVE_REPEATING_TIMER
parameter to preserve it.
The fields of the timeptr are:
| bool AB1805::resetConfig | ( | uint32_t | flags = 0 | ) |
Resets the configuration of the AB1805 to default settings.
| flags | flags to customize reset behavior (default: 0) |
The only exception currently defined is AB1805::RESET_PRESERVE_REPEATING_TIMER
that keeps repeating timers programmed when resetting configuration.
|
inline |
Resumes watchdog with same settings as before.
This is useful after returning from System.sleep()
in STOP or ULTRA_LOW_POWER sleep modes where executinon continues. You may also want to call updateWakeReason()
.
It's safe to call resumeWDT() even if the WDT has never been set, it does nothing in this case, leaving the watchdog off.
| bool AB1805::setCountdownTimer | ( | int | value, |
| bool | minutes | ||
| ) |
Used internally by interruptCountdownTimer and deepPowerDown.
| value | Value in seconds or minutes. Must be 0 < value <= 255! |
| minutes | True if minutes, false if seconds |
The countdown timer works even if the RTC has not been set yet, but is more limited in range (maximum: 255 minutes).
| bool AB1805::setRegisterBit | ( | uint8_t | regAddr, |
| uint8_t | bitMask, | ||
| bool | lock = true |
||
| ) |
Sets a bit in a register.
| regAddr | The address of the register to read/write |
| bitMask | The bit mask to set. This has a 1 bit in the bit you want to set, and will typically only have one bit set, though you can set multiple bits at the same time with this function. |
| lock | Whether to lock the I2C bus, the default is true. You pass false if you are grouping together functions in a single lock, for example doing a read/modify/write cycle. |
The bit is set only if cleared (0). If the bit(s) are already set, then only the read is done, and the write is skipped. A read is always done.
If lock is true, then the lock surround both the read and write so the entire operation is atomic.
| bool AB1805::setRtcFromSystem | ( | ) |
Set the RTC from the system clock.
This is called automatically from AB1805::loop() when the time is updated from the cloud. You normally don't need to call this yourself.
| bool AB1805::setRtcFromTime | ( | time_t | time, |
| bool | lock = true |
||
| ) |
Sets the RTC from a time_t.
| time | The time (in seconds since January 1, 1970, UNIX epoch), UTC. |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
This is called automatically from AB1805::loop() when the time is updated from the cloud. You normally don't need to call this yourself. You might call this if you are also getting time from an external source like a GPS.
| bool AB1805::setRtcFromTm | ( | const struct tm * | timeptr, |
| bool | lock = true |
||
| ) |
Sets the RTC from a time_t.
| timeptr | A struct tm specifying the time. |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
The following fields are required:
Note that you must include tm_wday and 0 = Sunday, 1 = Monday, ... Month of year is 0 - 11, NOT 1 - 12! Year is years since 1900, so 2020 has 120 in the tm_year field!
This is called automatically from AB1805::loop() when the time is updated from the cloud. You normally don't need to call this yourself. You might call this if you are also getting time from an external source like a GPS.
| bool AB1805::setTrickle | ( | uint8_t | diodeAndRout | ) |
Enable trickle charging mode.
| diodeAndRout | Pass 0 to disable the trickle charger or one diode constant and one rout constant below. |
Diode settings determine the voltage applied to the supercap or battery in trickle charge mode. This is from VCC, which is generally 3V3, so this will be a voltage of 2.7V or 3.0V. This makes the trickle charger compatible with a wider variety of supercaps.
REG_TRICKLE_DIODE_0_6
diode 0.6V dropREG_TRICKLE_DIODE_0_3
diode 0.3V dropThe ROUT setting determines the series resistor to the supercap. This determines charging speed.
REG_TRICKLE_ROUT_11K
rout 11KREG_TRICKLE_ROUT_6K
rout 6KREG_TRICKLE_ROUT_3K
rout 3KThe sample design includes an additional 1.5K series resistance using an external resistor, so applying 3K results in an actual series resistance of 4.5K.
| void AB1805::setup | ( | bool | callBegin = true | ) |
Call this from main setup() to initialize the library.
| callBegin | Whether to call wire.begin(). Default is true. |
| bool AB1805::setWDT | ( | int | seconds = -1 | ) |
Set or reset the watchdog timer.
| seconds | Duration of watchdog timer or -1 to tickle/pet/service the watchdog. |
Minimum is 4 and maximum is 124 seconds. 0 disables the watchdog timer. The constant WATCHDOG_MAX_SECONDS
is 124 and is a good choice. -1 resets the timer to the previous setting and is used to tickle/pet/service the watchdog timer. This is done from AB1805::loop().
Periodically servicing the watchdog (-1) is handled automatically in AB1805::loop() so you normally don't need to worry about it. Since it requires an I2C transaction you probably don't want to call it on every loop.
|
inline |
Stops the watchdog timer. Useful before entering sleep mode.
This is done automatically right before reset (using the reset system event) so the watchdog won't trigger during a firmware update.
|
protected |
Internal function used to handle system events.
We currently only handle the reset event to disable the WDT before reset so it won't trigger during a OTA firmware update.
|
staticprotected |
Static function passed to System.on.
AB1805 is a singleton so AB1805::instance is used to find the instance pointer.
|
static |
Convert a struct tm to register values for the AB1805.
| timeptr | Pointer to a struct tm with the values to convert from |
| array | Array of uint8_t to store the values to. This must be at least 6 bytes if includeYear is false or 7 if true. This points to the seconds field, not the hundredths field! |
| includeYear | True if this is the the year should be included (time setting), or false if the year should not be included (alarm setting). |
Note: Does not include the hundredths are struct tm doesn't include fractional seconds.
|
static |
Utility function to convert a struct tm * to a readable string.
| bool AB1805::updateWakeReason | ( | ) |
Update the wake reason. This is needed after STOP mode System.sleep()
The wake reason is set during AB1805::setup() automatically (for HIBERNATE, ULP, and SLEEP_MODE_DEEP) as well as normal reset, however if you are using STOP mode sleep, you must call updateWakeReason()
after System.sleep() returns to update the wake reason.
| bool AB1805::usingRCOscillator | ( | ) |
Check oscillator.
|
inline |
Call this before AB1805::setup() to specify the pin connected to FOUT/nIRQ.
| pin | The pin (like D8 ) that is connected to FOUT. |
This must be called before setup(). Default is PIN_INVALID
which signifies that FOUT is not connected.
This is used during chip detection as FOUT goes high after the AB1805 is initialized. While FOUT is low, the I2C interface is not yet ready.
The FOUT/nIRQ pin is also used for one-time and periodic interrupts.
|
virtual |
Low-level write call.
| ramAddr | The address in the RTC RAM to write to |
| data | The buffer containing the data to write |
| dataLen | The number of bytes to write |
| lock | Whether to lock the I2C bus, the default is true. You pass false if you are grouping together functions in a single lock, for example doing a read/modify/write cycle. |
The dataLen can be larger than the maximum I2C write. Multiple writes will be done if necessary. However do not read past the end of RAM (address 255).
| ramAddr | The address in the RTC RAM to write to |
| data | The buffer containing the data to write |
| dataLen | The number of bytes to write |
The dataLen can be larger than the maximum I2C write. Multiple writes will be done if necessary.
| bool AB1805::writeRegister | ( | uint8_t | regAddr, |
| uint8_t | value, | ||
| bool | lock = true |
||
| ) |
Writes a AB1805 register (single byte)
| regAddr | Register address to write to (0x00 - 0xff) |
| value | This value is written to the register |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
| bool AB1805::writeRegisters | ( | uint8_t | regAddr, |
| const uint8_t * | array, | ||
| size_t | num, | ||
| bool | lock = true |
||
| ) |
Writes sequential AB1805 registers.
| regAddr | Register address to start writing to (0x00 - 0xff) |
| array | Array of uint8_t values to write |
| num | Number of registers to write |
| lock | Lock the I2C bus. Default = true. Pass false if surrounding a block of related calls with a wire.lock() and wire.unlock() so the block cannot be interrupted with other I2C operations. |
Do not write past address 0xff.
|
protected |
Which GPIO is connected to FOUT/nIRQ.
Set to PIN_INVALID if not connected.
This is used for interrupts, and also to detect if the AB1805 is alive, during detectChip(). If not connected, then only I2C is used to detect the chip.
|
protected |
Watchdog period in seconds (1 <= watchdogSecs <= 124) or 0 for disabled.
This is used so setWDT(-1) can restore the previous value.


--- title: New Features version: "7.3" tags: - "7.3" - new-features ---
The closing marker for doc strings is no longer required to be followed by a semicolon or newline. Additionally the closing marker may be indented, in which case the indentation will be stripped from all lines in the doc string.
Array destructuring now supports reference assignments using the syntax
[&$a, [$b, &$c]] = $d
. The same is also supported
for list().
instanceof
now allows literals as the first operand, in
which case the result is always false
.
A new CompileError exception has been added, from
which ParseError inherits. A small number of
compilation errors will now throw a CompileError
instead of generating a fatal error. Currently this only affects compilation
errors that may be thrown by token_get_all() in
TOKEN_PARSE
mode, but more errors may be converted in
the future.
Trailing commas in function and method calls are now allowed.
The --with-password-argon2[=dir] configure
argument now provides support for both Argon2i and Argon2id hashes in the
password_hash(), password_verify(),
password_get_info(), and
password_needs_rehash() functions. Passwords may be hashed
and verified using the PASSWORD_ARGON2ID
constant.
Support for both Argon2i and Argon2id in the password_*()
functions now requires PHP be linked against libargon2 reference library ≥
20161029.
New options have been added to customize the FPM logging:
log_limit
log_buffering
decorate_workers_output
catch_workers_output
is enabled.
bcscale() can now also be used as getter to retrieve the current scale in use.
Full support for LDAP Controls has been added to the LDAP querying functions and ldap_parse_result():
$serverctrls
parameter to send controls to the
server in ldap_add(),
ldap_mod_replace(), ldap_mod_add(),
ldap_mod_del(), ldap_rename(),
ldap_compare(), ldap_delete(),
ldap_modify_batch(),
ldap_search(), ldap_list() and
ldap_read() has been added.
$serverctrls
to get controls from the server in
ldap_parse_result() has been added.
LDAP_OPT_SERVER_CONTROLS
and
LDAP_OPT_CLIENT_CONTROLS
in
ldap_get_option() and
ldap_set_option() has been fixed.
Support for full case-mapping and case-folding has been added. Unlike simple case-mapping, full case-mapping may change the length of the string. For example:
<?php
mb_strtoupper("Straße");
// Produces STRAßE on PHP 7.2
// Produces STRASSE on PHP 7.3
?>
MB_CASE_LOWER
(used by mb_strtolower())
MB_CASE_UPPER
(used by mb_strtoupper())
MB_CASE_TITLE
MB_CASE_FOLD
MB_CASE_LOWER_SIMPLE
MB_CASE_UPPER_SIMPLE
MB_CASE_TITLE_SIMPLE
MB_CASE_FOLD_SIMPLE
(used by case-insensitive operations)
Case-insensitive string operations now use case-folding instead of case- mapping during comparisons. This means that more characters will be considered (case insensitively) equal now.
mb_convert_case() with MB_CASE_TITLE
now performs title-case conversion based on the Cased and CaseIgnorable
derived Unicode properties. In particular this also improves handling of
quotes and apostrophes.
The Multibyte String data tables have been updated for Unicode 11.
The Multibyte String Functions now correctly support strings larger than 2GB.
Performance of the Multibyte String extension has been significantly improved across the board. The largest improvements are in case conversion functions.
The mb_ereg_*
functions now support named captures.
Matching functions like mb_ereg() will now return named
captures both using their group number and their name, similar to PCRE:
<?php
mb_ereg('(?<word>\w+)', '国', $matches);
// => [0 => "国", 1 => "国", "word" => "国"];
?>
\k<>
and \k''
notations to reference named
captures in the replacement string:
<?php
mb_ereg_replace('\s*(?<word>\w+)\s*', "_\k<word>_\k'word'_", ' foo ');
// => "_foo_foo_"
?>
\k<>
and \k''
can also be used for numbered
references, which also works with group numbers greater than 9.
Support for the completion_append_character
and
completion_suppress_append
options has been added to
readline_info(). These options are only available if PHP
is linked against libreadline (rather than libedit).


Election Time
问题描述 :
The cows are having their first election after overthrowing the tyrannical Farmer John, and Bessie is one of N cows (1 ≤ N ≤ 50,000) running for President. Before the election actually happens, however, Bessie wants to determine who has the best chance of winning.
The election consists of two rounds. In the first round, the K cows (1 ≤ K ≤ N) cows with the most votes advance to the second round. In the second round, the cow with the most votes becomes President.
Given that cow i expects to get Ai votes (1 ≤ Ai ≤ 1,000,000,000) in the first round and Bi votes (1 ≤ Bi ≤ 1,000,000,000) in the second round (if he or she makes it), determine which cow is expected to win the election. Happily for you, no vote count appears twice in the Ai list; likewise, no vote count appears twice in the Bi list.
输入:
* Line 1: Two space-separated integers: N and K
* Lines 2..N+1: Line i+1 contains two space-separated integers: Ai and Bi
输出:
* Line 1: The index of the cow that is expected to win the election.
样例输入:
5 3 3 10 9 2 5 6 8 4 6 5
样例输出:
5
解题代码:
//* @author<EMAIL_ADDRESS>import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Scanner; public class Main { static class vote { int first; int second; int index; } public static void main(String[] args) { Scanner in = new Scanner(System.in); int N = in.nextInt(); int K = in.nextInt(); // vote[] voters = new vote[N]; ArrayList< vote> voters = new ArrayList< vote>(); for (int i = 0; i < N; i++) { vote temp = new vote(); temp.first = in.nextInt(); temp.second = in.nextInt(); temp.index = i + 1; voters.add(temp); } Collections.sort(voters, new Comparator< Object>() { public int compare(Object o1, Object o2) { vote a = (vote) o1; vote b = (vote) o2; return b.first - a.first; } }); int result = 0; for (int i = 1; i < K; i++) { if (voters.get(result).second < voters.get(i).second) { result = i; } } System.out.println(voters.get(result).index); } }
这个方法是错的，不信你试试：
20 5
1 A:9
1 A:9
1 A:9
1 A:6
1 A:4
正确答案应该是19，这个答案是18
这个问题别太纠结了，不同的编译器结果不一样
simple, however efficient. A lot of instances it is difficult to get that a??perfect balancea?? among usability and appearance. I must say that youa??ve done a exceptional task with this. Also, the blog masses quite fast for me on Web explore.
很好的思路，可以借鉴
不错，赞一个！
We do not harbor that I couldn’t remove other individuals’ problems whenever this arrived at.
3，求得所有的为的总和sum—->所有数的总和
printf( "Not Possible" );—->printf("impossible");
对吗？
输入样例作为一个整体输入，带回车
没错的，九度OJ也有此题
这个也是算法导论的习题
这排版…你都打开来看看改改
站长，你好！
你创办的的网站非常好，为我们学习算法练习编程提供了一个很好的平台，我想给你提个小建议，就是要能把每道题目的难度标出来就好了，这样我们学习起来会有一个循序渐进的过程！
wt[n - 1]没错，因为下标是[0...n-1]


NodeCollection
Extends:
Collection → NodeCollection
A Node collection that allows saving & deleting an array of nodes
Constructor Summary
| Public Constructor | ||
| public |
|
Method Summary
| Public Methods | ||
| public |
Deletes all Nodes in this collection |
|
| public |
Save all Nodes in this collection |


Warehouse Wars Game
User Profile
All Scores
Main Page
User Profile
User Scores
Update Profile
Password
E-mail
Delete Account
You will lose all information if you delect account.
All Scores
Please login
Top 10 High Scores
Create account
User Name
Password
E-mail
Single Player Mode
MultiPlayer Mode
Score
All Users In Game
Chat Box
Draw Something
~ Hello
! ~
Status
Play Again
Logout
Controls
Legend
Player
Me
Devil
Empty
Square
Box
Monster
Wall


{% extends "site.html" %} {% load displayutils %} {% block title %}contact{% endblock %} {% block content %}
(or if you've got a feature request, question about the system, etc.)
<EMAIL_ADDRESS>if not user %}I'll need your User ID to diagnose issues with your account - once you've connected to a service, it'll be included in the link above{% endif %}
If you're tracking down an activity that hasn't synchronized, please check the activity dashboard. It'll do its best to tell you what went wrong. If you can't get things working yourself, make sure to include the date of the problem activity in your message.
In either case, I'll try to get back to you as soon as possible, subject to the whims of my day job and the current riding conditions.
{% endblock %}


AJ Brush
Full Stack Engineer with a passion for clean, intuitive UI and a love for React
Full Stack Engineer with a passion for clean, intuitive UI and a love for React
Full Stack Web Developer and Civil Engineer. Currently located in Austin, TX.
Full Stack Web Development Student at Lambda School , mom, professional coffee drinker. Located in Mercersburg, PA
Full Stack Web Developer. Currently located in the Bay Area.
Chineek enjoys web development because it’s revolving, and challenging. Currently located in the Bay Area.
Full Stack Web Development student attending Lambda school. Currently based in Harrisburg, PA.
Full Stack Web Developer. Currently located in Lewistville, Texas.
UX Designer focused on creating the best, intuitive and engaging User Experience. Currently located in Houston, Texas.


Table
class Table
Methods
No description
Get a TableSearch object
Find a record by primary key, throw a NotFoundException if record does not exists
Find a record by unique key and trhow an exception id record cannot be found
Count the number of record in table
Test if a record exists
Delete by primary/unique key value
Delete a record or throw an Exception
Update data into table
Insert on duplicate key
Return table relations
Return a record object for this table If $data is specified, the record will be filled with the data present in the associative array
Return table primary keys
Return primary key, if multiple primary keys found will throw an exception
Return list of table columns
Return the original table name
Return the prefixed table
Return underlying table manager
Details
at line 85
__construct(array|string $table, TableManager $tableManager)
at line 103
TableSearch
search(string $table_alias = null)
Get a TableSearch object
at line 113
ResultSet
all()
Return all records in the table
at line 130
Record|false
find(integer|string|array $id)
Find a record
at line 148
Record
findOrFail(integer|string|array $id)
Find a record by primary key, throw a NotFoundException if record does not exists
at line 169
Record|false
findOneBy(Where|Closure|string|array|PredicateInterface $predicate, string $combination = Predicate\PredicateSet::OP_AND)
Find a record by unique key
at line 223
Record
findOneByOrFail(Where|Closure|string|array|PredicateInterface $predicate, string $combination = Predicate\PredicateSet::OP_AND)
Find a record by unique key and trhow an exception id record cannot be found
at line 237
int
count()
Count the number of record in table
at line 250
int
countBy(Where|Closure|string|array|PredicateInterface $predicate, string $combination = Predicate\PredicateSet::OP_AND)
Find a record by unique key
at line 271
boolean
exists(integer|string|array $id)
Test if a record exists
at line 291
boolean
existsBy(Where|Closure|string|array|PredicateInterface $predicate, string $combination = Predicate\PredicateSet::OP_AND)
Test if a record exists by a predicate
at line 311
Select
select(string $table_alias = null)
Get a select object (Soluble\Db\Select)
at line 333
int
delete(integer|string|array $id)
Delete by primary/unique key value
at line 346
boolean
deleteBy(Where|Closure|string|array|PredicateInterface $predicate, string $combination = Predicate\PredicateSet::OP_AND)
Delete a record by predicate
at line 366
Table
deleteOrFail(integer|string|array $id)
Delete a record or throw an Exception
at line 393
int
update(array|ArrayObject $data, Where|Closure|string|array|PredicateInterface $predicate, string $combination = Predicate\PredicateSet::OP_AND, boolean $validate_datatypes = false)
Update data into table
at line 435
Record
insert(array|ArrayObject $data, boolean $validate_datatypes = false)
Insert data into table
at line 503
Record|false
insertOnDuplicateKey(array|ArrayObject $data, array $duplicate_exclude = array(), boolean $validate_datatypes = false)
Insert on duplicate key
at line 612
array
getRelations()
Return table relations
at line 633
Record
record($data = array(), $ignore_invalid_columns = true)
Return a record object for this table If $data is specified, the record will be filled with the data present in the associative array
If $throwException is true, if any non existing column is found an error will be thrown
at line 650
Relation
relation()
Return table relation reader
at line 667
array
getPrimaryKeys()
Return table primary keys
at line 693
int|string
getPrimaryKey()
Return primary key, if multiple primary keys found will throw an exception
at line 715
array
getColumnsInformation()
Return list of table columns
at line 730
string
getTableName()
Return the original table name
at line 740
string
getPrefixedTableName()
Return the prefixed table
at line 751
TableManager
getTableManager()
Return underlying table manager


Get early access today
It only takes a minute to sign up and our free starter tier is extremely generous. If you have any questions, our support team would be happy to help you.
Fylo stores your most important files in one secure location. Access them wherever you need, share and collaborate with friends, family, and co-workers.
Never let location be an issue when accessing your files. Fylo has you covered for all of your file storage needs.
Securely share files and folders with friends, family and colleagues for live collaboration. No email attachments required!
See how Fylo worksFylo has improved our team productivity by an order of magnitude. Since making the switch our team has become a well-oiled collaboration machine.
Kyle Burton
Founder & CEO, Huddle
It only takes a minute to sign up and our free starter tier is extremely generous. If you have any questions, our support team would be happy to help you.


PROPN
: proper noun
This document is a placeholder for the language-specific documentation
for PROPN
.
Treebank Statistics (UD_Polish)
There are 1613 PROPN
lemmas (13%), 1898 PROPN
types (9%) and 2580 PROPN
tokens (4%).
Out of 15 observed tags, the rank of PROPN
is: 4 in number of lemmas, 4 in number of types and 7 in number of tokens.
The 10 most frequent PROPN
lemmas: Polska, Warszawa, Polak, Europa, Piotr, Adam, Bóg, Paweł, Poznań, Andrzej
The 10 most frequent PROPN
types: Polski, Polsce, Warszawie, Polska, Adam, Andrzej, Polaków, SLD, Warszawy, PiS
The 10 most frequent ambiguous lemmas: SA (PROPN 5, X 1), C (X 1, PROPN 1), D (X 1, PROPN 1), M (X 5, PROPN 1), Nocny (PROPN 1, ADJ 1)
The 10 most frequent ambiguous types: Polski (PROPN 28, ADJ 2), Polska (PROPN 13, ADJ 3), Bóg (PROPN 5, NOUN 3), SA (PROPN 5, X 1), Panie (NOUN 4, PROPN 4), Woli (PROPN 4, NOUN 1), Pan (NOUN 46, PROPN 3), Zachodu (PROPN 3, NOUN 2), PO (PROPN 2, ADP 1), Tygodnia (PROPN 2, NOUN 1)
- Polski
- Polska
- Bóg
- SA
- Panie
- Woli
- Pan
- Zachodu
- PO
- Tygodnia
Morphology
The form / lemma ratio of PROPN
is 1.176689 (the average of all parts of speech is 1.696102).
The 1st highest number of forms (5) was observed with the lemma “Bóg”: Boga, Bogiem, Bogu, Boże, Bóg.
The 2nd highest number of forms (5) was observed with the lemma “Jezus”: Jezus, Jezusa, Jezusem, Jezusie, Jezusowi.
The 3rd highest number of forms (5) was observed with the lemma “Polak”: Polacy, Polak, Polaka, Polakiem, Polaków.
PROPN
occurs with 4 features: pl-feat/Case (2580; 100% instances), pl-feat/Gender (2580; 100% instances), pl-feat/Number (2580; 100% instances), pl-feat/Animacy (1621; 63% instances)
PROPN
occurs with 15 feature-value pairs: Animacy=Hum
, Animacy=Inan
, Animacy=Nhum
, Case=Acc
, Case=Dat
, Case=Gen
, Case=Ins
, Case=Loc
, Case=Nom
, Case=Voc
, Gender=Fem
, Gender=Masc
, Gender=Neut
, Number=Plur
, Number=Sing
PROPN
occurs with 51 feature combinations.
The most frequent feature combination is Animacy=Hum|Case=Nom|Gender=Masc|Number=Sing
(646 tokens).
Examples: Adam, Andrzej, Grzegorz, Jan, Jerzy, Piotr, Maciej, Stefan, Tomasz, Bóg
Relations
PROPN
nodes are attached to their parents using 12 different relations: pl-dep/nmod (1071; 42% instances), pl-dep/nsubj (620; 24% instances), pl-dep/obj (286; 11% instances), pl-dep/obl (219; 8% instances), pl-dep/appos (197; 8% instances), pl-dep/conj (116; 4% instances), pl-dep/iobj (40; 2% instances), pl-dep/nsubj:pass (15; 1% instances), pl-dep/root (7; 0% instances), pl-dep/case (4; 0% instances), pl-dep/flat (3; 0% instances), pl-dep/ccomp (2; 0% instances)
Parents of PROPN
nodes belong to 14 different parts of speech: VERB (1002; 39% instances), NOUN (945; 37% instances), PROPN (426; 17% instances), ADJ (124; 5% instances), X (22; 1% instances), NUM (16; 1% instances), PUNCT (11; 0% instances), ADP (7; 0% instances), ROOT (7; 0% instances), PART (5; 0% instances), PRON (5; 0% instances), ADV (4; 0% instances), AUX (3; 0% instances), DET (3; 0% instances)
1290 (50%) PROPN
nodes are leaves.
1029 (40%) PROPN
nodes have one child.
197 (8%) PROPN
nodes have two children.
64 (2%) PROPN
nodes have three or more children.
The highest child degree of a PROPN
node is 6.


NURSE BETTY A film review by Christopher Null Copyright 2000 filmcritic.com filmcritic.com
Neil LaBute, best known for his ultra-dark comedies In the Company of Men and Your Friends and Neighbors, breaks from his traditional mold and lightens up a tad with Nurse Betty, which -- again -- isn't going to win any awards for sensitivity.
For the first time, LaBute is not directing from his own script, which might explain why, if I didn't know better, I would have sworn I was watching a Coen brothers movie. Who else would put a fantasy dancing sequence on the edge of the Grand Canyon at night?
The new Neil LaBute, that's who. But lest you think you're getting a kinder, gentler Neil, rest assured that Nurse Betty is really quite gruesome in its depiction of the human soul as essentially empty. There's even a scalping thrown in for good measure.
Nurse Betty, played by Renée Zellweger, is actually a small-town Kansas waitress trapped in a loveless marriage to the local car dealer (Aaron Eckhart). Betty has one passion in life: The soap opera A Reason to Love, starring George McCord (Greg Kinnear) as famous heart surgeon Dr. David Ravell. When Betty's husband gets mixed up in a drug deal gone wrong, Betty witnesses his gruesome demise and mentally breaks down. Poof! She's convinced David Ravell is a real person, and she is his long-lost love.
If this sounds like a premise from a sitcom, that's because it is -- Brooke Shields played the Betty role against Matt LeBlanc's soap doc in a recent episode of Friends. But the similarities end there. Nurse Betty quickly becomes an epic farce, with Betty (now convinced she is a nurse) trekking to L.A. in one of her husband's Buicks... and little does she know there's a load of heroin in the trunk.
Undoubtedly the best part of the film is the team of Morgan Freeman and Chris Rock playing a father-son hit squad out to recover the drugs. Freeman plays the straight man to Rock's acerbic son who wants nothing more than to get their cross-country road trip in search of Betty over with. All the while, Freeman owns his scenes by trying to play Columbo and read Betty's mind while staring at a photograph of her. These guys are simply unstoppable when they're on the screen.
So is Miss Zellweger, after this and My, Myself & Irene, going to make a living out of playing half-deranged nuts? With Bridget Jones' Diary in the works, it certainly looks like it. Zellweger is in fine form here, even if Freeman and Rock steal the show.
Nurse Betty isn't LaBute's masterpiece, but it's definitely a solid, funny, and unique film, the likes of which you won't see again this year. If your tastes run to the truly eccentric, this should tide you over until the real Coen brothers movie, O Brother, Where Art Thou?, comes out later this year.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% extends 'site_base.html' %} {% block content %}
I couldn't find the thing you're looking for. Sorry.
Try the homepage


The Musketeer (2001) Reviewed by Eugene Novikov http://www.ultimate-movie.com/
"All for one... and one for all!"
Starring Justin Chambers, Mena Suvari, Stephen Rea, Tim Roth, Catherine Deneuve. Directed by Peter Hyams. Rated PG-13.
Alexander Dumas' The Three Musketeers is one of the most often-adapted literary works, and for good reason: the swashbuckler is a legend rather than just a story. Perhaps The Musketeer, a new film that "reimagines" the novel in the spirit and style of The Matrix, is one adaptation too many. It's just awful: spiritless, silly and unforgivably boring, transforming the timeless classic into a mish-mash of old-as-time clichés and incoherent, repetitive action sequences.
This time, D'Artagnan is played by Calvin Klein model Justin Chambers, who can't even pronounce his character's name. As a boy, he watched his father get killed by Febre (Tim Roth), a lackey of power-hungry Cardinal Richelieu. He vowed to have vengeance. After undergoing intense training under an expert swordsman, he goes looking for his enemy.
On his quest, he embroils himself in a struggle for control at the highest levels of the French government. The Royal Musketeers have lost their gusto, what with their jobs being taken over by the Cardinal's own guards. Only a few loyal swashbuckers remain, among them Athos and Portos (who are only figureheads in this movie). Together with D'Artagnan, they fight to extricate the Queen (Catherine Deneuve) from the traps that Febre and Richelieu are trying to plant. Oh, and as an afterthought, D'Artagnan falls in love with the poor maid at the local inn (Mena Suvari). Just thought I'd mention that.
Now, look: I don't know whose idea this was, but whoever is responsible deserves a severe tongue-lashing. I have nothing against "modernizing" classic works of literature - at the very least, they can inspire viewers to actually read the book - but films as dull as this have no positive side effects. Director Peter Hyams, known for such masterpieces of modern cinema as Timecop and End of Days, has jettisoned everything that was great about Dumas' masterwork: the sense of excitement, cause, and camaraderie. Instead, we get impressively choreographed but somehow vacuous, uninvolving action sequences that emerge from emptiness and lead to nothing. When the musketeers finally get to holler "All for one, and one for all," I could have sworn that was Dumas rolling in his grave that I felt.
Maybe the reason for the utter lack of suspense here is the Hyams's tone, which is unreasonably dark and brooding when you consider the Reader's Digest condensed version of the story that he gives us. It's as though anything that may have been construed as "fun" was purposely expunged from the production. The joylessness of the proceedings, from the oppressively shady lighting to the mechanical fight scenes, can be felt in every frame.
Chambers can't act; Suvari, Roth and Deneuve can, but aren't given the chance. And when push comes to shove, the use of stunt doubles is distractingly obvious, though at least Roth gets to play a villain without having to wear an ape suit.
Some movies seem sloppy and careless, clearly made for a quick buck. With The Musketeer we get the sense that it was meticulously crafted to be awful. The film is intricate, stylish and precise, hitting the wrong note every single time.
Grade: D-
Up Next: The Glass House
©2001 Eugene Novikov
========== X-RAMR-ID: 29731 X-Language: en X-RT-ReviewID: 253565 X-RT-TitleID: 1109693 X-RT-SourceID: 610 X-RT-AuthorID: 1577
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Wits To Turn To MDC Team For Players
by Mazola MolefeGavin Hunt says Bidvest Wits will be forced to strengthen the squad to manage their congested fixture list early next year, but don’t expect the Clever Boys to spend big.
“We need more numbers, and we had players that left and we couldn’t replace – Robyn Johannes and Fagrie Lakay were registered for CAF and Simon Murray is out for the rest of the season,” the coach said.
Read: Hunt: We Are Going To Get Hurt In January
With Wits progressing to the group stages of the CAF Confederation Cup and still determined to be among the Absa Premiership title challengers here at home, it means Hunt’s squad is stretched and their depth will be tested.
“We have terrible trips. None of them are one-stop trips – it’s two or three stop flights. Remember when you go there you still have to get flights back,” he said of their matches away against Djoliba (Mali), Al Nasr (Libya, likely to be played in Tunisia or Egypt) and Horoya (Guinea) in Group C of the competition.
“We play (one of the matches) December 29 as well, the only day we going to have off is Christmas Day. We have to strengthen a bit because we don’t have the squad to deal with our schedule at the moment. We had 25 players and now we are down to 17-18. We can register five now, but we are still short. But what can you do? The only place I can take from is our Diski Challenge team and will see where else,” said Hunt.


2018-04-28 励志故事之三：自强不息影响孩子 Inspiring Stories: the Spirit of Unremitting Self-improvement Influences Children cn
2018-04-20 “成也萧何败也萧何”蕴含之哲理︱月旦评 Philosophy of “Either Success or Failure Boils Down to the Same Person” cn
2018-03-31 Investment Promotion of Key Industries of Daiyue District, Taian City 泰安市岱岳区重点产业招商宣传片解说词 writing


Blog entry 5
Class is now in session
Today's Date
Classing it up
So you want to make a class? That's cool. We could alluse a little bit of class every now and then. So what is a class anyway?
Say you like bikes. I'm sorry, bicycles. I forgot that we're trying to be fancy. So you like bicycles and want to make a bicycle class.
So you start out with:There, you've done it! But you're wondering what's the point? well, a bike does more than just ride. It also has to stop.
You're probably wondering what all the point of that is? Why can't you just make a ride and brake method and be done? Well, think about your bicycles for a second. And now think about all the ones out there. What if you want to have a road bike? That would fit into the class of bicycles and you would only need to update some minor data.
So you get something like that going with an instance variable, so you can use it through all your methods. An instance variable can be used throughout the instance of the class.  Your brakes would be a local variable. It would be type_of_bike dependent since you don't want monster 9" hydraulic disc brakes on your 2 lb carbon frame.


{% extends "base.html" %}
{% load static %}
{% block title %}
Contact Us | Thank you for Contacting us | CraftTechSolution, Kenya
{% endblock %}
{% block content %}
Your query has been submitted. One of our representetives Will
get back to you shortly.Thank you for getting in touch with us.


This page cannot be found, please return home
If you think this is a problem, please contact support@artstent.com


Pat's Salmon Cookies!
OUR MISSION: To make the healthiest version of America's favorite snack representing our beautiful Pacific NW!
This is what our cookies are made of: A delicious & locally caught Pacific NW salmon! Even if you don't like it, you can't even taste it. But you do get all the nutritional benifits. WIN WIN!
OUR ORIGINAL: Our original cookie is the staple of all salmon cookies. Take home and share a bite of your Pacific NW experience!
GIFTS: Visit our gift shop in our stores for our exclusive Salmon Cookie Items. The perfect gift for your loves ones!
1st and Pike
Our original location!
Seattle Center
Where you can get your nutrition, sweet-tooth, and your shopping fix all in one.
Capital Hill
Dance, karaoke, and show your NW Pride with our rainbow cookies offered only here.
Alki
Relax and sit back on the beach, and try our salmon shaped cookies, offered only hereat this!


Welcome to your first example on Spring Security Form-based authentication
You can read the step by step tutorial on
gauravbytes
Go to the
View Users


Room
List of Patient
Preparing data, please wait ...
Patient
Open Chat
Login As
Dr. Diana
Dr. John Doe
Dr. Jane Doe


Async Batcher Example
Select a color:
Red
Blue
Yellow
Green
Black
Enter a value:
Enter a number of tasks to insert:
Submit
Color Stats
Refresh Stats


How was each question answered?
The District-Wide Surveys include approximately {{$ctrl.numQuestionsStudent}} student questions, {{$ctrl.numQuestionsParent}} parent questions,
{{$ctrl.numQuestionsTeacher}} teacher questions, and
{{$ctrl.numQuestionsPrincipal}} principal questions. Here you can view aggregated responses to each of these questions. For a list of all questions included on the {{$ctrl.CYTD}} surveys, visit
the Survey Questions website.
Click ⊕ Select a new question
to view questions based on respondent group, topic, and subtopic. After choosing a question, the chart on the right will display the percent of respondents who selected each possible response (bars represent data for
{{$ctrl.CYTD}}, while circles show the same data for {{$ctrl.PYTD}}). Blue bars and circles represent the "most positive" response, while red bars and circles represent the "least positive" response. You can hover over a bar to see the numbers for each year.
In the blue ribbons below, you can compare responses to specific questions by respondent characteristics, by location, or across networks and schools.
Compare your selected schools or groups of respondents with another group. The selections you've made from the green bar above are displayed on the left graph. Choose comparison groups from the panel on the right. These respondents' responses will display on the right-hand chart.
{{$ctrl.questionStem}}
{{$ctrl.questionText}}
The chart below reflects the schools and respondent groups selected in the green bar at the top of the screen. If no selections have been made, city-wide averages are displayed.
The chart below allows you to create a comparison set of schools and respondent groups. Make selections below to change values in the chart. If no selections are made, city-wide averages are displayed.
View "% most positive" by school on the map for {{$ctrl.CYTD}}. This is the average % of questions in which respondents selected the "most positive" response (such as "strongly agree"). You can zoom or scroll the area of the map.
{{$ctrl.questionStem}}
{{$ctrl.questionText}}
The following chart displays the average "% most positive" scores by network or school. This is the average % of questions in which respondents selected the "most positive" response (such as "strongly agree"). Bars display "% most positive" in {{$ctrl.CYTD}}. Circles display "% most positive" in {{$ctrl.PYTD}}. Each bar and circle represents a learning network. You can click on a network to see all schools in that network. For Student and Parent questions you may click on a school to show grade levels in that school.


BARB WIRE A film review by Michael John Legeros Copyright 1996 Michael John Legeros
We'll Always Have BARB WIRE
(Gramercy) Directed by David Hogan Written by Chuck Pfarrer and Ilene Chaiken Cast Pamela Anderson Lee, Temuera Morrison, Victoria Rowell , Steve Railsback, Jack Noseworthy, Xander Berkeley, Udo Kier MPAA Rating "R" (presumably language, violence, and brief nudity) Running Time 95 minutes Reviewed at Six Forks Station Cinemas, Raleigh, NC (6MAY96)
==
It's not every day that we get to see a reworking of CASABLANCA, much less one that (a.) is adapted from a comic book and (b.) stars Pamela Anderson Lee. Ms. Lee, a.k.a. "the Baywatch babe," a.k.a. "you're looking rather buoyant this evening," plays the title character, a bounty-hunting bar owner who lives in a (near) future where civil war is being waged between the Nazi-looking Congressionals and the underground Resistance. They all come to Barb's place, though, because she doesn't take sides. That is, until a former lover-- and Resistance alley-- steps out of the past and into her bar. Sound familiar?
 (Trust me: it sounds more exciting than it is.) BARB WIRE has a great "look," but director David Hogan doesn't deliver a decent action sequence until the end. And don't expect any Bogarts or Bergmans, either; most of the cast appears to have been hired for "assets" other than their acting abilities. (Calm down guys, this stuff doesn't even qualify as *soft*-core porn. Just cleavage cleavage cleavage and only the *occasional* peek behind curtains number one and two.) No, there isn't much to this movie beyond the, uh, obvious, but if you love CASABLANCA, and you can stomach Pamela Lee's hissed-through- clinched-teeth line readings, then this may be the matinee for you.
Grade: D+
--
Mike Legeros - Raleigh, NC
<EMAIL_ADDRESS>(h) -<EMAIL_ADDRESS>(w)
Visit me in MOVIE HELL
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Review Analysis
Results for Review
{% if prediction[0] == "Positive"%}
Positive Review
{% elif prediction[0]== "Negative"%}
Negative Review
{% elif prediction[0] == "Neutral"%}
Neutral Review
{% endif %}


Create your account.
Name :
Email :
Code PIN :
Biography :
Job Role : Select a job Front-end Back-end Full-stack
Sign Up


TaskyApp tends to be smart. It tries to detect phone's context switch and starts sensing on its own, only during office hours you provide!
Detected tasks will be presented to you in a list. You choose appropriate task and label it with difficulty scale.
If you are not sure about the task then leave it or click on "Discard", rather than labelling it.
Don't worry! Your data is anonymised and sent to a server located at Faculty of Computer and Information science in Ljubljana.
You can check some of the data by clicking "Statistics" on the first screen. Get your personalized work tasks' stats including:
Before using TaskyApp you will have to agree to the following terms of use:
By clicking "I Agree" below, I agree to participate in the TaskyApp
study. The application will collect data that samples my location, collocation with
other Bluetooth and WiFi devices, connectivity type, phone screen and battery status, accelerometer and microphone amplitude readings.
I understand that access to any data collected will only be allowed to FRI mobile computing
research team and only for the purpose of conducting these experiments.
Any published results of this study will only refer to anonymised and
obfuscated data, and aggregated statistics that do not reveal the identities of the
participants. As a participant I have the right to opt out of this study at any time during this
experiment by uninstalling the application. Moreover, I have the right to access any
information in the data set related to me, and request for any part of that data to be
removed.
Gašper Urh
<EMAIL_ADDRESS>App is developed as part of a master thesis at Faculty of Computer and Information science, University of Ljubljana.


TABOO (GOHATTO) A film review by Jonathan Curiel Copyright 2001 filmcritic.com filmcritic.com
It's been 25 years since Japanese director Nagisa Oshima shocked international audiences with In the Realm of the Senses, his lurid look at a sadomasochistic couple that loses all abandon and commits a carnal act never before captured on the big screen: one lover cuts off the other's penis.
New Yorker Films is hyping the similarity between Senses and Oshima's latest work, Taboo, saying the new film, "like... Senses, deals with the anti-authoritarian sway of sexuality, a nearly taboo subject in Japan."
Don't believe the hype. In many ways, Taboo is the antithesis of Senses -- from its lack of sexual explicitness to its historic setting in 19th century Kyoto. Where Senses captures the hedonistic life of a heterosexual couple, Taboo showers us with androgyny, same-sex yearnings, and macho sword fights, all in a samurai setting that tests the characters' moral and physical strength.
In the enclave of an all-male militia designed to protect the Shogun, does it matter that some of the men sleep with each other? "Don't ask, don't tell" takes on new meaning with Taboo, a movie that works so well because it's filled with characters like Toshizo Hijikata, an agonized samurai captain played with aplomb by Beat Takeshi. Takeshi, a director in his own right and a comedic TV star in Japan, is the heart and soul of Taboo (and gets top billing). Takeshi's aging captain struggles to accept the fact that a newly recruited teenage samurai is fooling around with a fellow recruit, and that many of the other samurai are in love with the teen.
>From the opening scene, that teen withstands his new profession's vicissitudes, which require him to execute dishonored militia and kill those who would kill him. The young samurai (newcomer Ryuhei Matsuda) has banged hair, pale skin, feminine lips -- and biceps big enough to handle the swords and knives he needs to defend himself in bed and on the streets of Kyoto, where dangerous thugs walk around. His reason for joining the samurai is clear: "To have the right to kill," he tells an inquisitor in the samurai headquarters.
Phalli are never shown in Taboo, and why should they be? Taboo isn't a film about sex -- it's a film about Japan's last samurai and the way one person can have a dramatic effect on those around him. With a film score by Ryuichi Sakamoto (best known for his Oscar-winning work on The Last Emperor), and outfits and backdrops that show off the beauty of pre-modern Japan, Taboo is another new film from Asia that deserves considerable attention. It may not feature the stunning martial arts scenes or operatic storyline of Crouching Tiger, Hidden Dragon, and it may not have the happy ending of Chunhyang, but like those two period pieces, Taboo is a visual marvel from start to finish.
Moviegoers are lucky that the 68-year-old Oshima is still around to make films like Taboo, which was honored at last year's Cannes Film Festival and is now being released theatrically. Oshima suffered a serious stroke in 1996, forcing him to take a three-year sabbatical. But he has re-emerged with new vigor to complete Taboo, his 26th film, telling one interviewer, "I've spent all my life breaking taboos."

Visit filmcritic.com on the Web at http://www.filmcritic.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Home / Shop / Vita Energy Cookies
Vita Energy Cookies
Coming soon!
€45.00 20 PV
Perfect for diet programs, effective for muscle gains, provides a quick recovery after workouts. For the maximum health benefits, we recommend consuming this product as a part of DiaVita© Smart Nutrition Program.
Coming soon!


We aggregate cats!
- optimize end-to-end metrics
- orchestrate scalable models
- incubate clicks-and-mortar infrastructures
- utilize 24/365 e-markets
- engineer extensible vortals
- streamline viral convergence
- iterate bricks-and-clicks eyeballs
- exploit back-end experiences
- leverage world-class schemas
- integrate strategic synergies
- mesh seamless partnerships
- repurpose visionary networks
- architect bricks-and-clicks convergence


This is where we tell you how great our software is.
welcome!
Enter the email you'd like to use with Apply:
Get Started!


+++ title = "Max and Joel" slug = "max-and-joel" date = 2007-10-29T13:00:00+10:00 tags = ["small-world", "eccentric-encounters", "locals"] locations = ["england/london"] draft = false summary = """
These two lads are flat-sharing here in London's Mile End area, and they're being kind and hospitable enough to host my mate Jack, during his week or so in the city. Max is a London local, and Joel's originally an Irish boy. Max met Jack a few years ago, when he was backpacking round the world, and when he crashed at Jack's place in Adelaide. Now he's returning the favour. Great blokes.
""" +++These two lads are flat-sharing here in London's Mile End area, and they're being kind and hospitable enough to host my mate Jack, during his week or so in the city. Max is a London local, and Joel's originally an Irish boy. Max met Jack a few years ago, when he was backpacking round the world, and when he crashed at Jack's place in Adelaide. Now he's returning the favour. Great blokes.


Temperature Converter
A minimal
re-frame
application.
Source:
https://github.com/philip-healy/temperature


-
Yummy Burgers
-
Delicious Pizzas
-
Unlimited Pastas
-
Cakes
-
Desserts
-
Green Salads
-
Grilled Chickens
-
Steamed Fishes
-
Tasty Fruit Juices
Rich diversity in food preparation
Originated from the diverse regions of China
Originated from Etruscan, ancient Greek, and ancient Roman


Skip links
Skip to primary navigation
Skip to content
Skip to footer
Life, the Universe and Fishing
Archive
Gallery
Research
About
Toggle search
Toggle menu
Gallery
Landscapes
Landscapes
Panoramas
Panoramas
Travel
Travel
Fishing
Fishing
Portraits
Portraits
Enter your search term...


ilogb
, ilogbf
—get exponent of floating-point numberSynopsis
#include <math.h> int ilogb(double val); int ilogbf(float val);
Description
All nonzero, normal numbers can be described as m *
2**p. ilogb
and ilogbf
examine the argument
val, and return p. The functions frexp
and
frexpf
are similar to ilogb
and ilogbf
, but also
return m.
Returns
ilogb
and ilogbf
return the power of two used to form the
floating-point argument.
If val is 0
, they return FP_ILOGB0
.
If val is infinite, they return INT_MAX
.
If val is NaN, they return FP_ILOGBNAN
.
(FP_ILOGB0
and FP_ILOGBNAN
are defined in math.h, but in turn are
defined as INT_MIN or INT_MAX from limits.h. The value of FP_ILOGB0 may be
either INT_MIN or -INT_MAX. The value of FP_ILOGBNAN may be either INT_MAX or
INT_MIN.)
Portability
C99, POSIX


| Infinitive | Past simple | Past Participle | Meaning |
|---|---|---|---|
|
{{elem}} |
The purpose of this page is to provide an environment for English learners to test their knowledge on irregular verbs. The application has been available for everyone on the Internet so that anyone can access this tool whenever they need it, no matter the institution they belong to (or if they are self-taught!)
First, you will be asked how many different verbs will be displayed in the table for you to fill out their respective forms. When you press the button, a list with as many (randomly chosen) verbs as you wanted will appear, showing only one of their forms. The goal is to fill out the rest with as many few errors as possible.
When you feel like you're ready to check your results, press the at the bottom of the page and you will be given a score and the correct forms will be displayed on the table (on green if they were correct, and on red if they were not).
You can regenerate the list again with new verbs whenever you want to by clicking the button (and changing the number of verbs if you wish to do so).
If you have any particular suggestions or you find a bug, please open an issue on the project's repository so I can comfortably see what is left to do near my workspace. Please consider referring to the project's known bugs file and read it before opening an issue if you have time to do so. Any criticism is welcome, specially if it is aimed at making the application better and more approachable by everyone. You can also find me on my LinkedIn page.