thermosphere: set correct gpio config for uart (thanks @hexkyz)

This commit is contained in:
TuxSH
2019-07-20 01:48:55 +02:00
parent 1d225ed5f8
commit 20e5689f04
4 changed files with 278 additions and 2 deletions

View File

@@ -2,14 +2,18 @@
#include "uart.h"
#include "car.h"
#include "log.h"
#include "gpio.h"
int main(void)
{
// Init uart (hardcoded atm)
uart_select(UART_C);
clkrst_reboot(CARDEVICE_UARTC);
gpio_configure_mode(TEGRA_GPIO(G, 0), GPIO_MODE_GPIO); // Leave UART-B as GPIO
gpio_configure_mode(TEGRA_GPIO(D, 1), GPIO_MODE_SFIO); // Change UART-C to SPIO
uart_select(UART_C); // Configure pinmux for UART-C
clkrst_reboot(CARDEVICE_UARTC); // Enable UART-C clock
uart_init(UART_C, 115200, true);
//uart_send(UART_C, "0123\n", 3);
serialLog("Hello from Thermosphere!\n");
return 0;
}