afarhan/radiono — pull request #4 by sarfata (2014-02-10 02:06:36+00:00)
Title: Refactor si570 + Automatically calibrate the module + Detect errors

I have split the Si570 code in a separate class and done the following changes:

In the Si570 class:

- Use the factory-calibrated output frequency to automatically calculate the internal
crystal frequency and use that instead of hard coded values.
- During initialization detect errors talking to the Si570.
- Use multi-bytes i2c reads and writes when possible (ie: read/write multiple bytes
without re-starting a transaction). Only works for read/writes in consecutive registers.
- Use types with explicit size where that makes sense (uint8_t instead of char, uint64_t, etc)
- Added some debugging on the serial console through a "debug" function

In the main sketch:

- Show a message on the LCD if the Si570 is unreachable.
- Initialize the serial port for debugging
- Fix some compilation warnings with string litterals being casted to char*
- Removed unused variables