Merge branch 'devices' Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
mcp7940n: don't clobber the control & trim registers when setting time We were accidentally writing 0 to both control and trim. This resulted in MFP getting tied to ground (possibly drawing current via the external pull-up) and trim getting disabled. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add DIDR0 & DIDR1 register defines (ATmega48P) Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add PRR register defines (ATmega48P) Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add SMCR register defines (ATmega48P) Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add ACSR register defines (ATmega48P) Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: extend i2c_rx_byte to return the status (ATmega48P) Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add function to sync I2C device that returs current status (ATmega48P) This is more flexible than the previous sync function that expected a specific status. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add I2C NACK defines (ATmega48P) Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add function to concurrently send and receive SPI data (ATmega48P) Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: use correct polarity for the end-of-string check The condition in usart_tx_flash_str was backward and therefore it never printed anything when given a non-zero length string, and went beyond end-of-buffer when given an empty string. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: usart_tx_flash_str should use CRLF instead of just LF At the end of the string, we should generate CRLF instead of just LF to properly repositition the terminal cursor at the beginning of the next line. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
build: clean known object files If there was an object file in a subdirectory, it didn't get cleaned prior to this change. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Merge branch 'devices' Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
devices: add SHT40 temp & humidity sensor definitions & code Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
devices: add code to access MCP7940N RTC Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add support for ATmega88A Aside from having 8kB of program flash, the hardware is identical to ATmega48A. As a result, the support looks very much like an alias. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add support for ATmega48A Since it is essentially the same chip as the ATmega48P, make it an alias. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Merge devices branch Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
devices: rename all MCP7940N symbols and defines to be device specific Using the generic "RTC" prefix was nice and short, but ultimately confusing because it wasn't obvious if that was some kind of generic RTC layer or a specific device. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>