Browse Source

fix last bits of namespace pollution

ugv_io
Alex Mikhalev 6 years ago
parent
commit
c27b53796d
  1. 6
      components/sx127x_driver/sx127x_driver.c
  2. 7
      components/sx127x_driver/sx127x_internal.h

6
components/sx127x_driver/sx127x_driver.c

@ -76,9 +76,9 @@ esp_err_t sx127x_init(const sx127x_config_t *config, sx127x_t **handle_ptr) { @@ -76,9 +76,9 @@ esp_err_t sx127x_init(const sx127x_config_t *config, sx127x_t **handle_ptr) {
// perform reset
gpio_set_level(config->rst_io_num, 0);
vTaskDelay(RESET_DELAY);
vTaskDelay(SX127X_RESET_DELAY);
gpio_set_level(config->rst_io_num, 1);
vTaskDelay(RESET_DELAY);
vTaskDelay(SX127X_RESET_DELAY);
spi_bus_config_t bus_config = {
.mosi_io_num = config->mosi_io_num,
@ -100,7 +100,7 @@ esp_err_t sx127x_init(const sx127x_config_t *config, sx127x_t **handle_ptr) { @@ -100,7 +100,7 @@ esp_err_t sx127x_init(const sx127x_config_t *config, sx127x_t **handle_ptr) {
.duty_cycle_pos = 0,
.cs_ena_pretrans = 0,
.cs_ena_posttrans = 0,
.clock_speed_hz = SPI_CLOCK_HZ, // 8mhz
.clock_speed_hz = SX127X_SPI_CLOCK_HZ, // 8mhz
.input_delay_ns = 0,
.spics_io_num = config->cs_io_num,
.flags = 0,

7
components/sx127x_driver/sx127x_internal.h

@ -12,13 +12,10 @@ @@ -12,13 +12,10 @@
#define SX127X_TX_QUEUE_LEN 8
#define SX127X_SPI_QUEUE_SIZE 8
#define SX127X_SPI_DMA_CHAN 1
#define SX127X_SPI_CLOCK_HZ (8 * 1000 * 1000)
#define SX127X_MAX_TRANSFER (256)
#define RESET_DELAY (pdMS_TO_TICKS(15))
// 8mhz
#define SPI_CLOCK_HZ (8 * 1000 * 1000)
#define SX127X_RESET_DELAY (pdMS_TO_TICKS(15))
#ifdef NODEBUG

Loading…
Cancel
Save