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>
arch: define struct tm

This is a broken down gregorian calendar timestamp.

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>
arch: add simple USART API for ATmega48P

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
arch: add simple I2C API for ATmega48P

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Merge branch 'devices'

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
devices: add MCP49[012]2 DAC code

These are fairly simple 2-channel DACs.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Next