Files
@ 988bab1cb593
Branch filter:
Location: therm/ssd1306.h - annotation
988bab1cb593
1.3 KiB
text/plain
Got things mostly compiling, disabled SPI and USB for now because of RAM overflow
7476de768f19 7476de768f19 0f9d3eff7dfc 988bab1cb593 988bab1cb593 988bab1cb593 2dc26aaf0a89 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 2dc26aaf0a89 2dc26aaf0a89 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 988bab1cb593 2dc26aaf0a89 2dc26aaf0a89 a0df808541ba a9e06183f42b 4157af9eb546 a9e06183f42b 4157af9eb546 e0a38751daed a0df808541ba 1c5909c633fa 1c5909c633fa 49b0586d1fdf 49b0586d1fdf | #ifndef ssd1306_H
#define ssd1306_H
#define SSD_RESET GPIOB,GPIO_PIN_2
#define SSD_A0 GPIOB,GPIO_PIN_10
#define SSD_CS GPIOB,GPIO_PIN_1
#define SSD_Reset_Low() HAL_GPIO_WritePin(SSD_RESET, 0)
#define SSD_Reset_High() HAL_GPIO_WritePin(SSD_RESET, 1)
#define SSD_A0_Low() HAL_GPIO_WritePin(SSD_A0, 0)
#define SSD_A0_High() HAL_GPIO_WritePin(SSD_A0, 1)
#define SSD_CS_Low() HAL_GPIO_WritePin(SSD_CS, 0)
#define SSD_CS_High() HAL_GPIO_WritePin(SSD_CS, 1)
// Use stdperiph
//extern SPI_HandleTypeDef spi1;
// EMZ FIXME this won't really work
//#define SPI_SendByte(data) HAL_SPI_Transmit(&spi1, data, 1, 100)
#define SPI_SendByte(data)
#define SPI_Wait()
//#define SPI_SendByte(data) SPI_I2S_SendData(SPI1,data)
//#define SPI_Wait() while(!(SPI1->SR&SPI_FLAG_TXE));while(SPI1->SR&SPI_FLAG_BSY);
void ssd1306_Init(void);
void ssd1306_DrawChar(char ascii, unsigned char row, unsigned char xPos);
void ssd1306_DrawCharBig(char ascii, unsigned char row, unsigned char xPos);
void ssd1306_DrawString(const char *dataPtr, unsigned char row, unsigned char xPos);
void ssd1306_DrawStringBig(const char *dataPtr, unsigned char row, unsigned char xPos);
void ssd1306_drawlogo();
void ssd1306_clearscreen();
#endif
// vim:softtabstop=4 shiftwidth=4 expandtab
|