Files
@ 9294a623e8e5
Branch filter:
Location: therm/ssd1306.h - annotation
9294a623e8e5
1.3 KiB
text/plain
Added support for both heaters and coolers as well as thermostatic control
ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 d4552b17855a d4552b17855a ab7abb62e433 857e86bbc10d ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 45ee045c249f 45ee045c249f 857e86bbc10d 857e86bbc10d 857e86bbc10d 857e86bbc10d 857e86bbc10d ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 | #ifndef ssd1306_H
#define ssd1306_H
#define SSD_RESET GPIOA,GPIO_PIN_3
#define SSD_A0 GPIOA,GPIO_PIN_4
#define SSD_CS GPIOA,GPIO_PIN_2
#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)
#include "spi.h"
// EMZ FIXME this won't really work
#define SPI_SendByte(data) HAL_SPI_Transmit(spi_get(), &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);
#include "stm32f0xx_hal_conf.h"
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
|