class pah8011 for mbed
pah8011/pah_platform_functions.h@5:37451de228e4, 2017-10-27 (annotated)
- Committer:
- bell_huang
- Date:
- Fri Oct 27 08:21:32 2017 +0000
- Revision:
- 5:37451de228e4
- Parent:
- 3:0b9497a4b249
- Child:
- 6:d196b612b14a
Change debug printf
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bell_huang | 3:0b9497a4b249 | 1 | /*============================================================================== |
bell_huang | 3:0b9497a4b249 | 2 | * Edit History |
bell_huang | 3:0b9497a4b249 | 3 | * |
bell_huang | 3:0b9497a4b249 | 4 | * This section contains comments describing changes made to the module. Notice |
bell_huang | 3:0b9497a4b249 | 5 | * that changes are listed in reverse chronological order. Please use ISO format |
bell_huang | 3:0b9497a4b249 | 6 | * for dates. |
bell_huang | 3:0b9497a4b249 | 7 | * |
bell_huang | 3:0b9497a4b249 | 8 | * when who what, where, why |
bell_huang | 3:0b9497a4b249 | 9 | * ---------- --- ----------------------------------------------------------- |
bell_huang | 3:0b9497a4b249 | 10 | * 2016-04-29 bell Initial revision. |
bell_huang | 3:0b9497a4b249 | 11 | ==============================================================================*/ |
bell_huang | 3:0b9497a4b249 | 12 | |
bell_huang | 3:0b9497a4b249 | 13 | #ifndef __pah_platform_functions_h__ |
bell_huang | 3:0b9497a4b249 | 14 | #define __pah_platform_functions_h__ |
bell_huang | 5:37451de228e4 | 15 | |
bell_huang | 5:37451de228e4 | 16 | #include <stdint.h> |
bell_huang | 5:37451de228e4 | 17 | #include <stdbool.h> |
bell_huang | 5:37451de228e4 | 18 | |
bell_huang | 3:0b9497a4b249 | 19 | |
bell_huang | 5:37451de228e4 | 20 | bool i2c_write_reg(uint8_t addr, uint8_t data); |
bell_huang | 5:37451de228e4 | 21 | bool i2c_read_reg(uint8_t addr, uint8_t *data); |
bell_huang | 5:37451de228e4 | 22 | bool i2c_burst_read_reg(uint8_t addr, uint8_t *data, uint32_t rx_size); |
bell_huang | 5:37451de228e4 | 23 | void delay_ms(uint64_t ms); |
bell_huang | 3:0b9497a4b249 | 24 | |
bell_huang | 5:37451de228e4 | 25 | typedef void (*DEBUG_PRINT_HANDLE)(const char *fmt, ...); |
bell_huang | 5:37451de228e4 | 26 | extern DEBUG_PRINT_HANDLE debug_printf; |
bell_huang | 5:37451de228e4 | 27 | |
bell_huang | 3:0b9497a4b249 | 28 | #define debug_printf_1 debug_printf |
bell_huang | 3:0b9497a4b249 | 29 | #define debug_printf_2 debug_printf |
bell_huang | 3:0b9497a4b249 | 30 | #define debug_printf_3 debug_printf |
bell_huang | 3:0b9497a4b249 | 31 | #define debug_printf_4 debug_printf |
bell_huang | 3:0b9497a4b249 | 32 | |
bell_huang | 3:0b9497a4b249 | 33 | |
bell_huang | 3:0b9497a4b249 | 34 | #endif // header guard |