paul@1 | 1 | #ifndef __BSP_H__ |
paul@1 | 2 | #define __BSP_H__ |
paul@1 | 3 | |
paul@1 | 4 | #include <ubb/ubb.h> |
paul@1 | 5 | |
paul@5 | 6 | /* Pin assignments: |
paul@1 | 7 | * |
paul@5 | 8 | * Sniffer UBB EM027AS012 |
paul@5 | 9 | * ------- ---- ----------- |
paul@5 | 10 | * DAT2 DAT2 4 (MOSI) |
paul@5 | 11 | * CD DAT3 6 (SSEL) |
paul@5 | 12 | * CMD CMD 11 (PWM) |
paul@5 | 13 | * VCC VDD 13 (PANEL) |
paul@5 | 14 | * CLK CLK 3 (SCK) |
paul@5 | 15 | * GND GND |
paul@5 | 16 | * DAT0 DAT0 12 (RESET) |
paul@5 | 17 | * DAT1 DAT1 14 (DIS) |
paul@1 | 18 | * |
paul@1 | 19 | * General connections: |
paul@1 | 20 | * |
paul@5 | 21 | * EM027AS012 |
paul@5 | 22 | * ---------- |
paul@5 | 23 | * 1 (GND) |
paul@5 | 24 | * 2 (3V3) |
paul@1 | 25 | */ |
paul@1 | 26 | |
paul@5 | 27 | #define EPD_MOSI UBB_DAT2 |
paul@5 | 28 | #define EPD_SSEL UBB_DAT3 |
paul@5 | 29 | #define EPD_PWM UBB_CMD |
paul@5 | 30 | #define EPD_SCK UBB_CLK |
paul@5 | 31 | #define EPD_RESET UBB_DAT0 |
paul@5 | 32 | #define EPD_DIS UBB_DAT1 |
paul@1 | 33 | |
paul@1 | 34 | /* Board-specific interface functions. */ |
paul@1 | 35 | |
paul@1 | 36 | void bsp_init(); |
paul@1 | 37 | void bsp_InitDisplayHardware(); |
paul@1 | 38 | void bsp_PowerOn(); |
paul@1 | 39 | void bsp_pwm_active(uint16_t delayInMs); |
paul@1 | 40 | void bsp_Shutdown(); |
paul@1 | 41 | void bsp_spiInit(); |
paul@1 | 42 | void bsp_writeToDisplay(uint8_t *data, uint16_t len); |
paul@1 | 43 | void bsp_delayMs(uint32_t ms); |
paul@1 | 44 | void bsp_delayUs(uint32_t us); |
paul@1 | 45 | uint32_t bsp_getMsTicks(); |
paul@1 | 46 | int16_t bsp_getTemp(); |
paul@1 | 47 | |
paul@1 | 48 | #endif /* __BSP_H__ */ |