summaryrefslogtreecommitdiff
path: root/code/esp32/components/eos/modem.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2019-12-04 06:12:15 +0100
committerUros Majstorovic <majstor@majstor.org>2019-12-04 06:12:15 +0100
commit4c28fb525edc64fa16c6c3bf10929dca65d9c77c (patch)
tree2531b3bcc2d06c655f6eb9a6233696f5eadfa089 /code/esp32/components/eos/modem.c
parent31578e285a21a749a49e3ac146feb8b02fcc7b52 (diff)
esp32 refactoring
Diffstat (limited to 'code/esp32/components/eos/modem.c')
-rw-r--r--code/esp32/components/eos/modem.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/code/esp32/components/eos/modem.c b/code/esp32/components/eos/modem.c
index 5b55f03..7e3131f 100644
--- a/code/esp32/components/eos/modem.c
+++ b/code/esp32/components/eos/modem.c
@@ -10,7 +10,6 @@
#include "eos.h"
-#include "fe310.h"
#define BUF_SIZE 1024
#define UART_GPIO_DTR 32
@@ -35,7 +34,7 @@ static void uart_event_task(void *pvParameters) {
uart_get_buffered_data_len(UART_NUM_2, &len);
if (len) {
len = uart_read_bytes(UART_NUM_2, data, len, 100 / portTICK_RATE_MS);
- eos_fe310_send(EOS_FE310_CMD_MODEM_DATA, data, len);
+ // eos_net_send(EOS_FE310_CMD_MODEM_DATA, data, len);
}
break;
default:
@@ -60,10 +59,10 @@ void eos_modem_init(void) {
uart_param_config(UART_NUM_2, &uart_config);
uart_set_pin(UART_NUM_2, 17, 16, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
uart_driver_install(UART_NUM_2, BUF_SIZE, BUF_SIZE, 10, &uart_queue, 0);
-
+
// Configuration for the DTR/RI lines
gpio_config_t io_conf;
-
+
io_conf.intr_type = GPIO_INTR_DISABLE;
io_conf.mode = GPIO_MODE_OUTPUT;
io_conf.pin_bit_mask = ((uint64_t)1 << UART_GPIO_DTR);
@@ -71,7 +70,7 @@ void eos_modem_init(void) {
gpio_set_level(UART_GPIO_DTR, 1);
// Create a task to handle uart event from ISR
- xTaskCreate(uart_event_task, "uart_event_task", 2048, NULL, EOS_PRIORITY_MODEM, NULL);
+ xTaskCreate(uart_event_task, "uart_event_task", 2048, NULL, EOS_IRQ_PRIORITY_UART, NULL);
}
ssize_t eos_modem_write(void *data, size_t size) {