You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
/* |
|
* u8g2_esp32_hal.h |
|
* |
|
* Created on: Feb 12, 2017 |
|
* Author: kolban |
|
*/ |
|
|
|
#ifndef U8G2_ESP32_HAL_H_ |
|
#define U8G2_ESP32_HAL_H_ |
|
|
|
#if __cplusplus |
|
extern "C" { |
|
#endif |
|
|
|
#include "u8g2.h" |
|
|
|
#include "driver/gpio.h" |
|
#include "driver/i2c.h" |
|
#include "driver/spi_master.h" |
|
|
|
#define I2C_MASTER_NUM I2C_NUM_1 // I2C port number for master dev |
|
#define I2C_MASTER_TX_BUF_DISABLE 0 // I2C master do not need buffer |
|
#define I2C_MASTER_RX_BUF_DISABLE 0 // I2C master do not need buffer |
|
#define I2C_MASTER_FREQ_HZ 400000 // I2C master clock frequency |
|
#define ACK_CHECK_EN 0x1 // I2C master will check ack from slave |
|
#define ACK_CHECK_DIS 0x0 // I2C master will not check ack from slave |
|
|
|
uint8_t u8g2_esp32_spi_byte_cb(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, |
|
void *arg_ptr); |
|
uint8_t u8g2_esp32_i2c_byte_cb(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, |
|
void *arg_ptr); |
|
uint8_t u8g2_esp32_gpio_and_delay_cb(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, |
|
void *arg_ptr); |
|
|
|
#if __cplusplus |
|
} |
|
#endif |
|
|
|
#endif /* U8G2_ESP32_HAL_H_ */ |