class pah8011 for mbed
pah8011/pah_comm.h@0:242cf8f28bf2, 2017-10-26 (annotated)
- Committer:
- bell_huang
- Date:
- Thu Oct 26 02:49:44 2017 +0000
- Revision:
- 0:242cf8f28bf2
- Child:
- 6:d196b612b14a
Init version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bell_huang | 0:242cf8f28bf2 | 1 | /*============================================================================== |
bell_huang | 0:242cf8f28bf2 | 2 | * Edit History |
bell_huang | 0:242cf8f28bf2 | 3 | * |
bell_huang | 0:242cf8f28bf2 | 4 | * This section contains comments describing changes made to the module. Notice |
bell_huang | 0:242cf8f28bf2 | 5 | * that changes are listed in reverse chronological order. Please use ISO format |
bell_huang | 0:242cf8f28bf2 | 6 | * for dates. |
bell_huang | 0:242cf8f28bf2 | 7 | * |
bell_huang | 0:242cf8f28bf2 | 8 | * when who what, where, why |
bell_huang | 0:242cf8f28bf2 | 9 | * ---------- --- ----------------------------------------------------------- |
bell_huang | 0:242cf8f28bf2 | 10 | * 2016-10-18 bh - Add enum: pah_comm_bus_e. |
bell_huang | 0:242cf8f28bf2 | 11 | * - Add function: pah_comm_get_bus_type(). |
bell_huang | 0:242cf8f28bf2 | 12 | * 2016-04-12 bh - Add license information and revision information |
bell_huang | 0:242cf8f28bf2 | 13 | * 2016-04-07 bh - Initial revision. |
bell_huang | 0:242cf8f28bf2 | 14 | ==============================================================================*/ |
bell_huang | 0:242cf8f28bf2 | 15 | |
bell_huang | 0:242cf8f28bf2 | 16 | #ifndef __pah_comm_h__ |
bell_huang | 0:242cf8f28bf2 | 17 | #define __pah_comm_h__ |
bell_huang | 0:242cf8f28bf2 | 18 | |
bell_huang | 0:242cf8f28bf2 | 19 | |
bell_huang | 0:242cf8f28bf2 | 20 | #include "pah_platform_types.h" |
bell_huang | 0:242cf8f28bf2 | 21 | |
bell_huang | 0:242cf8f28bf2 | 22 | |
bell_huang | 0:242cf8f28bf2 | 23 | typedef enum { |
bell_huang | 0:242cf8f28bf2 | 24 | |
bell_huang | 0:242cf8f28bf2 | 25 | pah_comm_bus_i2c, |
bell_huang | 0:242cf8f28bf2 | 26 | pah_comm_bus_spi, |
bell_huang | 0:242cf8f28bf2 | 27 | |
bell_huang | 0:242cf8f28bf2 | 28 | } pah_comm_bus_e; |
bell_huang | 0:242cf8f28bf2 | 29 | |
bell_huang | 0:242cf8f28bf2 | 30 | |
bell_huang | 0:242cf8f28bf2 | 31 | bool pah_comm_write(uint8_t addr, uint8_t data); |
bell_huang | 0:242cf8f28bf2 | 32 | bool pah_comm_read(uint8_t addr, uint8_t *data); |
bell_huang | 0:242cf8f28bf2 | 33 | bool pah_comm_burst_read(uint8_t addr, uint8_t *data, uint16_t num); |
bell_huang | 0:242cf8f28bf2 | 34 | |
bell_huang | 0:242cf8f28bf2 | 35 | pah_comm_bus_e pah_comm_get_bus_type(void); |
bell_huang | 0:242cf8f28bf2 | 36 | |
bell_huang | 0:242cf8f28bf2 | 37 | |
bell_huang | 0:242cf8f28bf2 | 38 | #endif // header guard |