29 #ifndef _SSD1306_YOUR_PLATFORM_IO_H_ 30 #define _SSD1306_YOUR_PLATFORM_IO_H_ 77 static inline int digitalRead(
int pin)
82 static inline void digitalWrite(
int pin,
int level)
86 static inline void pinMode(
int pin,
int mode)
90 static inline int analogRead(
int pin)
95 static inline uint32_t millis(
void)
100 static inline uint32_t micros(
void)
105 static inline void delay(uint32_t ms)
109 static inline void delayMicroseconds(uint32_t us)
114 static inline void randomSeed(
int seed)
118 static inline void attachInterrupt(
int pin,
void (*interrupt)(),
int level)
122 static inline uint8_t pgm_read_byte(
const void *ptr)
124 return *((
const uint8_t *)ptr);
127 static inline uint16_t eeprom_read_word(
const void *ptr)
132 static inline void eeprom_write_word(
const void *ptr, uint16_t val)
136 static inline char *utoa(
unsigned int num,
char *str,
int radix)
144 #if defined(CONFIG_PLATFORM_I2C_AVAILABLE) && defined(CONFIG_PLATFORM_I2C_ENABLE) 150 #if defined(CONFIG_PLATFORM_SPI_AVAILABLE) && defined(CONFIG_PLATFORM_SPI_ENABLE) 161 static inline int random(
int max)
166 static inline int random(
int min,
int max)
void ssd1306_platform_spiInit(int8_t busId, int8_t cesPin, int8_t dcPin)
Initializes spi interface for platform being used.
void ssd1306_platform_i2cInit(int8_t busId, uint8_t addr, ssd1306_platform_i2cConfig_t *cfg)
Initializes i2c interface for platform being used.