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