Commit Graph

2 Commits

Author SHA1 Message Date
Christian Mauderer
5115e6524f bsps/shared: Fix Coverity warning in MCP7940M
Fixes the following Coverity warning:

** CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time()

Basically coverity warns that (buf[...] & 0x7) can't be bigger than 7.
Just remove the unnecessary comparison.
2023-08-03 07:18:37 +02:00
Christian Mauderer
38dd86355d bsps/shared: Add MCP7940M RTC driver
The MCP7940M is a I2C RTC chip. The new driver uses the dev/i2c API to
support the RTC. It is written with the intention, that the driver can
be adapted to other RTCs with a similar register layout by just
replacing the initialization function.
2023-08-01 09:24:33 +02:00