Change to "advanced"

This commit is contained in:
servadmin 2021-11-18 08:04:11 -05:00
parent 109c704d33
commit f4737ad3e9
3 changed files with 5 additions and 5 deletions

View File

@ -140,9 +140,9 @@ public:
unsigned long delay) {
init_i2c_sw(&u8g2, gpio_chip, scl, sda, res, delay);
}
void initSpiHwAdvance(uint8_t gpio_chip, uint8_t bus, uint8_t dc, uint8_t res,
void initSpiHwAdvanced(uint8_t gpio_chip, uint8_t bus, uint8_t dc, uint8_t res,
uint8_t cs, unsigned int spi_mode, uint32_t max_speed) {
init_spi_hw_advance(&u8g2, gpio_chip, bus, dc, res, cs, spi_mode, max_speed);
init_spi_hw_advanced(&u8g2, gpio_chip, bus, dc, res, cs, spi_mode, max_speed);
}
void initSpiHw(uint8_t gpio_chip, uint8_t bus, uint8_t dc, uint8_t res,
uint8_t cs) {

View File

@ -79,7 +79,7 @@ void init_i2c_sw(u8g2_t *u8g2, uint8_t gpio_chip, uint8_t scl, uint8_t sda,
/*
* Allocate user_data_struct for hardware SPI advanced.
*/
void init_spi_hw_advance(u8g2_t *u8g2, uint8_t gpio_chip, uint8_t bus, uint8_t dc,
void init_spi_hw_advanced(u8g2_t *u8g2, uint8_t gpio_chip, uint8_t bus, uint8_t dc,
uint8_t res, uint8_t cs, unsigned int spi_mode, uint32_t max_speed) {
user_data_t *user_data = init_user_data(u8g2);
user_data->gpio_chip = gpio_chip;
@ -96,7 +96,7 @@ void init_spi_hw_advance(u8g2_t *u8g2, uint8_t gpio_chip, uint8_t bus, uint8_t d
*/
void init_spi_hw(u8g2_t *u8g2, uint8_t gpio_chip, uint8_t bus, uint8_t dc,
uint8_t res, uint8_t cs) {
init_spi_hw_advance(u8g2, gpio_chip, bus, dc, res, cs, 0, 500000);
init_spi_hw_advanced(u8g2, gpio_chip, bus, dc, res, cs, 0, 500000);
}
/*

View File

@ -47,7 +47,7 @@ user_data_t *init_user_data(u8g2_t *u8g2);
void init_i2c_hw(u8g2_t *u8g2, uint8_t bus);
void init_i2c_sw(u8g2_t *u8g2, uint8_t gpio_chip, uint8_t scl, uint8_t sda,
uint8_t res, unsigned long delay);
void init_spi_hw_advance(u8g2_t *u8g2, uint8_t gpio_chip, uint8_t bus, uint8_t dc,
void init_spi_hw_advanced(u8g2_t *u8g2, uint8_t gpio_chip, uint8_t bus, uint8_t dc,
uint8_t res, uint8_t cs, unsigned int spi_mode, uint32_t max_speed);
void init_spi_hw(u8g2_t *u8g2, uint8_t gpio_chip, uint8_t bus, uint8_t dc,
uint8_t res, uint8_t cs);