class pah8011 for mbed
Diff: pah8011/pah_comm.h
- Revision:
- 0:242cf8f28bf2
- Child:
- 6:d196b612b14a
diff -r 000000000000 -r 242cf8f28bf2 pah8011/pah_comm.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pah8011/pah_comm.h Thu Oct 26 02:49:44 2017 +0000 @@ -0,0 +1,38 @@ +/*============================================================================== +* Edit History +* +* This section contains comments describing changes made to the module. Notice +* that changes are listed in reverse chronological order. Please use ISO format +* for dates. +* +* when who what, where, why +* ---------- --- ----------------------------------------------------------- +* 2016-10-18 bh - Add enum: pah_comm_bus_e. +* - Add function: pah_comm_get_bus_type(). +* 2016-04-12 bh - Add license information and revision information +* 2016-04-07 bh - Initial revision. +==============================================================================*/ + +#ifndef __pah_comm_h__ +#define __pah_comm_h__ + + +#include "pah_platform_types.h" + + +typedef enum { + + pah_comm_bus_i2c, + pah_comm_bus_spi, + +} pah_comm_bus_e; + + +bool pah_comm_write(uint8_t addr, uint8_t data); +bool pah_comm_read(uint8_t addr, uint8_t *data); +bool pah_comm_burst_read(uint8_t addr, uint8_t *data, uint16_t num); + +pah_comm_bus_e pah_comm_get_bus_type(void); + + +#endif // header guard