GPS implementation (#216)
Implemented basic GPS support: - GPS HAL - GPS Service - GPS Settings app
This commit is contained in:
committed by
GitHub
parent
2345ba6d13
commit
14e459e50f
@@ -6,7 +6,7 @@
|
||||
// Power on
|
||||
#define TDECK_POWERON_GPIO GPIO_NUM_10
|
||||
|
||||
static bool tdeck_power_on() {
|
||||
static bool powerOn() {
|
||||
gpio_config_t device_power_signal_config = {
|
||||
.pin_bit_mask = BIT64(TDECK_POWERON_GPIO),
|
||||
.mode = GPIO_MODE_OUTPUT,
|
||||
@@ -26,9 +26,9 @@ static bool tdeck_power_on() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool tdeck_init_power() {
|
||||
bool tdeckInit() {
|
||||
ESP_LOGI(TAG, LOG_MESSAGE_POWER_ON_START);
|
||||
if (!tdeck_power_on()) {
|
||||
if (!powerOn()) {
|
||||
TT_LOG_E(TAG, LOG_MESSAGE_POWER_ON_FAILED);
|
||||
return false;
|
||||
}
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
#define TDECK_SPI_TRANSFER_SIZE_LIMIT (TDECK_LCD_HORIZONTAL_RESOLUTION * TDECK_LCD_SPI_TRANSFER_HEIGHT * (TDECK_LCD_BITS_PER_PIXEL / 8))
|
||||
|
||||
bool tdeck_init_power();
|
||||
bool tdeckInit();
|
||||
|
||||
extern const tt::hal::Configuration lilygo_tdeck = {
|
||||
.initBoot = tdeck_init_power,
|
||||
.initBoot = tdeckInit,
|
||||
.createDisplay = createDisplay,
|
||||
.createKeyboard = createKeyboard,
|
||||
.sdcard = createTdeckSdCard(),
|
||||
@@ -39,7 +39,7 @@ extern const tt::hal::Configuration lilygo_tdeck = {
|
||||
tt::hal::i2c::Configuration {
|
||||
.name = "External",
|
||||
.port = I2C_NUM_1,
|
||||
.initMode = tt::hal::i2c::InitMode::ByTactility,
|
||||
.initMode = tt::hal::i2c::InitMode::Disabled,
|
||||
.canReinit = true,
|
||||
.hasMutableConfiguration = true,
|
||||
.config = (i2c_config_t) {
|
||||
@@ -84,8 +84,8 @@ extern const tt::hal::Configuration lilygo_tdeck = {
|
||||
.uart {
|
||||
tt::hal::uart::Configuration {
|
||||
.port = UART_NUM_1,
|
||||
.initMode = tt::hal::uart::InitMode::ByTactility,
|
||||
.canReinit = false,
|
||||
.initMode = tt::hal::uart::InitMode::Disabled, // Let GPS driver control this interface
|
||||
.canReinit = true,
|
||||
.hasMutableConfiguration = false,
|
||||
.rxPin = GPIO_NUM_44,
|
||||
.txPin = GPIO_NUM_43,
|
||||
@@ -94,7 +94,7 @@ extern const tt::hal::Configuration lilygo_tdeck = {
|
||||
.rxBufferSize = 1024,
|
||||
.txBufferSize = 1024,
|
||||
.config = {
|
||||
.baud_rate = 9600,
|
||||
.baud_rate = 38400,
|
||||
.data_bits = UART_DATA_8_BITS,
|
||||
.parity = UART_PARITY_DISABLE,
|
||||
.stop_bits = UART_STOP_BITS_1,
|
||||
@@ -107,5 +107,12 @@ extern const tt::hal::Configuration lilygo_tdeck = {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
.gps = {
|
||||
tt::hal::gps::GpsDevice::Configuration {
|
||||
.name = "Internal",
|
||||
.uartPort = UART_NUM_1,
|
||||
.baudRate = 38400
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user