1 #ifndef __BSP_H__ 2 #define __BSP_H__ 3 4 #include <ubb/ubb.h> 5 #include "EPD.h" 6 7 /* Pin assignments: 8 * 9 * Sniffer UBB EM027AS012 10 * ------- ---- ----------- 11 * DAT2 DAT2 4 (MOSI) 12 * CD DAT3 6 (SSEL) 13 * CMD CMD 11 (PWM) 14 * VCC VDD 13 (PANEL) 15 * CLK CLK 3 (SCK) 16 * GND GND 17 * DAT0 DAT0 12 (RESET) 18 * DAT1 DAT1 14 (DIS) 19 * 20 * General connections: 21 * 22 * EM027AS012 23 * ---------- 24 * 1 (GND) 25 * 2 (3V3) 26 */ 27 28 #define EPD_MOSI UBB_DAT2 29 #define EPD_SSEL UBB_DAT3 30 #define EPD_PWM UBB_CMD 31 #define EPD_SCK UBB_CLK 32 #define EPD_RESET UBB_DAT0 33 #define EPD_DIS UBB_DAT1 34 35 /* Board-specific interface functions. */ 36 37 void EPD_Pin_init(); 38 void EPD_Pin_EPD_CS(EPD_pinstate pin); 39 void EPD_Pin_RESET(EPD_pinstate pin); 40 void EPD_Pin_PANEL_ON(EPD_pinstate pin); 41 void EPD_Pin_DISCHARGE(EPD_pinstate pin); 42 void EPD_Pin_BORDER(EPD_pinstate pin); 43 void EPD_Pin_PWM(EPD_pinstate pin); 44 EPD_pinstate epd_get_busy(); 45 46 void bsp_spiWrite(uint8_t *buffer, uint16_t length); 47 void bsp_delayMs(uint32_t ms); 48 void bsp_delayUs(uint32_t us); 49 uint32_t bsp_getMsTicks(); 50 uint32_t bsp_getUsTicks(); 51 int16_t bsp_getTemp(); 52 53 #endif /* __BSP_H__ */