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 * General connections: 20 * 21 * EM027AS012 22 * ---------- 23 * 1 (GND) 24 * 2 (3V3) 25 */ 26 27 #define EPD_MOSI UBB_DAT2 28 #define EPD_SSEL UBB_DAT3 29 #define EPD_PWM UBB_CMD 30 #define EPD_SCK UBB_CLK 31 #define EPD_RESET UBB_DAT0 32 #define EPD_DIS UBB_DAT1 33 34 /* Board-specific interface functions. */ 35 36 void bsp_init(); 37 void bsp_InitDisplayHardware(); 38 void bsp_PowerOn(); 39 void bsp_pwm_active(uint16_t delayInMs); 40 void bsp_Shutdown(); 41 void bsp_spiInit(); 42 void bsp_writeToDisplay(uint8_t *data, uint16_t len); 43 void bsp_delayMs(uint32_t ms); 44 void bsp_delayUs(uint32_t us); 45 uint32_t bsp_getMsTicks(); 46 int16_t bsp_getTemp(); 47 48 #endif /* __BSP_H__ */