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@6 | 19 | * Remember that the pin numbering is "mirrored" on the end of a cable: |
paul@6 | 20 | * |
paul@6 | 21 | * Socket __ |
paul@6 | 22 | * -------------------- --------- --------- |
paul@6 | 23 | * 2 4 6 8 10 12 14 1 3 5 7 9 11 13 |
paul@6 | 24 | * 1 3 5 7 9 11 13 2 4 6 8 10 12 14 |
paul@6 | 25 | * ---------__--------- -------------------- |
paul@6 | 26 | * Cable |
paul@6 | 27 | * |
paul@1 | 28 | * General connections: |
paul@1 | 29 | * |
paul@6 | 30 | * 3.3V Supply EM027AS012 |
paul@6 | 31 | * ----------- ---------- |
paul@6 | 32 | * GND 1 (GND) |
paul@6 | 33 | * 3V3 2 (3V3) |
paul@1 | 34 | */ |
paul@1 | 35 | |
paul@5 | 36 | #define EPD_MOSI UBB_DAT2 |
paul@5 | 37 | #define EPD_SSEL UBB_DAT3 |
paul@5 | 38 | #define EPD_PWM UBB_CMD |
paul@5 | 39 | #define EPD_SCK UBB_CLK |
paul@5 | 40 | #define EPD_RESET UBB_DAT0 |
paul@5 | 41 | #define EPD_DIS UBB_DAT1 |
paul@1 | 42 | |
paul@1 | 43 | /* Board-specific interface functions. */ |
paul@1 | 44 | |
paul@1 | 45 | void bsp_init(); |
paul@1 | 46 | void bsp_InitDisplayHardware(); |
paul@1 | 47 | void bsp_PowerOn(); |
paul@1 | 48 | void bsp_pwm_active(uint16_t delayInMs); |
paul@1 | 49 | void bsp_Shutdown(); |
paul@1 | 50 | void bsp_spiInit(); |
paul@1 | 51 | void bsp_writeToDisplay(uint8_t *data, uint16_t len); |
paul@1 | 52 | void bsp_delayMs(uint32_t ms); |
paul@1 | 53 | void bsp_delayUs(uint32_t us); |
paul@1 | 54 | uint32_t bsp_getMsTicks(); |
paul@1 | 55 | int16_t bsp_getTemp(); |
paul@1 | 56 | |
paul@1 | 57 | #endif /* __BSP_H__ */ |