Skip to content

Commit

Permalink
[coco] change S3 UART to 1 from 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffpiep authored and dillera committed Sep 23, 2024
1 parent f8eb9be commit 41247a8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/pinmap/coco_esp32s3.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
/* UART */
#define PIN_UART0_RX GPIO_NUM_44 // fnUART.cpp
#define PIN_UART0_TX GPIO_NUM_43
#define PIN_UART1_RX GPIO_NUM_NC
#define PIN_UART1_TX GPIO_NUM_NC
#define PIN_UART1_RX GPIO_NUM_18
#define PIN_UART1_TX GPIO_NUM_17
#define PIN_UART2_RX GPIO_NUM_18
#define PIN_UART2_TX GPIO_NUM_17

Expand Down
14 changes: 14 additions & 0 deletions lib/bus/drivewire/drivewire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,20 @@ void systemBus::setup()
fnDwCom.begin(_drivewireBaud);
fnDwCom.flush_input();
Debug_printv("DRIVEWIRE MODE");

// jeff hack to see if the S3 is getting serial data
// Debug_println("now receiving data...");
// uint8_t b[] = {' '};
// while(1)
// {
// while (fnDwCom.available())
// {
// fnDwCom.read(b,1);
// Debug_printf("%c\n",b[0]);
// }
// }
// end jeff hack

}

// Give devices an opportunity to clean up before a reboot
Expand Down
2 changes: 1 addition & 1 deletion lib/hardware/fnUART.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifdef ESP_PLATFORM
# include <driver/uart.h>
# define FN_UART_DEBUG UART_NUM_0
# ifdef BUILD_RS232
# if defined(BUILD_RS232) || defined(PINMAP_COCO_ESP32S3)
# define FN_UART_BUS UART_NUM_1
# else
# define FN_UART_BUS UART_NUM_2
Expand Down
10 changes: 10 additions & 0 deletions pico/coco/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,16 @@ int main()
// printf("\nwelcome to cococart\n");

setup_pio_uart();

// begin jeff hack to send data to S3
// char c = ' ' + 1;
// while(1)
// {
// uart_tx_program_putc(pioblk_rw, SM_UART_TX, c++);
// busy_wait_ms(1000);
// }
// end jeff hack

setup_becker_port();
setup_rom_emulator();

Expand Down

0 comments on commit 41247a8

Please sign in to comment.