Init
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#include "pins.h"
|
||||
#include "driver/gpio.h"
|
||||
void set_pin_dirs() {
|
||||
gpio_set_direction(WS2812_PIN, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(BUTTON_BACK, GPIO_MODE_INPUT);
|
||||
gpio_set_direction(LCD_BACKLIGHT_AND_RGB_POWER, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(LCD_RESET, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(LCD_RS, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(LCD_DAT, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(LCD_SCK, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(LCD_CS, GPIO_MODE_OUTPUT);
|
||||
// gpio_set_direction(BUS_I2C_SDA , GPIO_MODE_);
|
||||
// gpio_set_direction(BUS_I2C_SCL , GPIO_MODE_);
|
||||
// gpio_set_direction(SIDE_PORT_A , GPIO_MODE_);
|
||||
// gpio_set_direction(SIDE_PORT_B , GPIO_MODE_);
|
||||
gpio_set_direction(AUDIO_SCLK, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(AUDIO_ASDOUT, GPIO_MODE_INPUT);
|
||||
gpio_set_direction(AUDIO_LRCK, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(AUDIO_DSDIN, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(KEYBOARD_INT, GPIO_MODE_INPUT);
|
||||
gpio_set_direction(IR_LED, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(BATTERY_ADC, GPIO_MODE_INPUT);
|
||||
gpio_set_direction(MICROSD_CS, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(MICROSD_MOSI, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(MICROSD_CLK, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(MICROSD_MISO, GPIO_MODE_INPUT);
|
||||
gpio_set_direction(HEADER_RESET, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(HEADER_INT, GPIO_MODE_INPUT);
|
||||
gpio_set_direction(HEADER_BUSY, GPIO_MODE_INPUT);
|
||||
gpio_set_direction(HEADER_CS, GPIO_MODE_OUTPUT);
|
||||
gpio_set_direction(HEADER_UART_RX, GPIO_MODE_INPUT);
|
||||
gpio_set_direction(HEADER_UART_TX, GPIO_MODE_OUTPUT);
|
||||
}
|
||||
Reference in New Issue
Block a user