initialise GPIO pins
This commit is contained in:
parent
71eacfc4f2
commit
13be9eb9b7
1 changed files with 1 additions and 0 deletions
|
@ -49,6 +49,7 @@ void MatrixPanel_I2S_DMA::fm6124init(const HUB75_I2S_CFG& _cfg) {
|
||||||
bool REG2[16] = {0,0,0,0,0, 0,0,0,0,1,0, 0,0,0,0,0}; // a single bit enables the matrix output
|
bool REG2[16] = {0,0,0,0,0, 0,0,0,0,1,0, 0,0,0,0,0}; // a single bit enables the matrix output
|
||||||
|
|
||||||
for (uint8_t _pin:{_cfg.gpio.r1, _cfg.gpio.r2, _cfg.gpio.g1, _cfg.gpio.g2, _cfg.gpio.b1, _cfg.gpio.b2, _cfg.gpio.clk, _cfg.gpio.lat, _cfg.gpio.oe}){
|
for (uint8_t _pin:{_cfg.gpio.r1, _cfg.gpio.r2, _cfg.gpio.g1, _cfg.gpio.g2, _cfg.gpio.b1, _cfg.gpio.b2, _cfg.gpio.clk, _cfg.gpio.lat, _cfg.gpio.oe}){
|
||||||
|
gpio_reset_pin((gpio_num_t)_pin); // some pins are not un gpio mode after reset => https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/gpio.html#gpio-summary
|
||||||
gpio_set_direction((gpio_num_t) _pin, GPIO_MODE_OUTPUT);
|
gpio_set_direction((gpio_num_t) _pin, GPIO_MODE_OUTPUT);
|
||||||
gpio_set_level((gpio_num_t) _pin, LOW);
|
gpio_set_level((gpio_num_t) _pin, LOW);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue