Skip to content

Commit

Permalink
remove redundant wait loop
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Jul 18, 2024
1 parent ce12cc4 commit ea432a8
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 48 deletions.
3 changes: 0 additions & 3 deletions examples/receive_fsk/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO2, device);

ESP_ERROR_CHECK(sx127x_set_opmod(SX127x_MODE_RX_CONT, SX127x_MODULATION_FSK, device));
while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
3 changes: 0 additions & 3 deletions examples/receive_fsk_beacon/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO2, device);

ESP_ERROR_CHECK(sx127x_set_opmod(SX127x_MODE_RX_CONT, SX127x_MODULATION_FSK, device));
while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
3 changes: 0 additions & 3 deletions examples/receive_fsk_filtered/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO2, device);

ESP_ERROR_CHECK(sx127x_set_opmod(SX127x_MODE_RX_CONT, SX127x_MODULATION_FSK, device));
while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
3 changes: 0 additions & 3 deletions examples/receive_fsk_fixed/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO2, device);

ESP_ERROR_CHECK(sx127x_set_opmod(SX127x_MODE_RX_CONT, SX127x_MODULATION_FSK, device));
while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
3 changes: 0 additions & 3 deletions examples/receive_lora/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO0, device);

ESP_ERROR_CHECK(sx127x_set_opmod(SX127x_MODE_RX_CONT, SX127x_MODULATION_LORA, device));
while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
3 changes: 0 additions & 3 deletions examples/receive_lora_implicit_header/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO0, device);

ESP_ERROR_CHECK(sx127x_set_opmod(SX127x_MODE_RX_CONT, SX127x_MODULATION_LORA, device));
while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
3 changes: 0 additions & 3 deletions examples/receive_ook/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO2, device);

ESP_ERROR_CHECK(sx127x_set_opmod(SX127x_MODE_RX_CONT, SX127x_MODULATION_OOK, device));
while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
6 changes: 3 additions & 3 deletions examples/temperature/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ void app_main() {
.quadhd_io_num = -1,
.max_transfer_sz = 0,
};
ESP_ERROR_CHECK(spi_bus_initialize(HSPI_HOST, &config, 1));
ESP_ERROR_CHECK(spi_bus_initialize(SPI2_HOST, &config, 1));
spi_device_interface_config_t dev_cfg = {
.clock_speed_hz = 3E6,
.clock_speed_hz = 4E6,
.spics_io_num = SS,
.queue_size = 16,
.command_bits = 0,
.address_bits = 8,
.dummy_bits = 0,
.mode = 0};
spi_device_handle_t spi_device;
ESP_ERROR_CHECK(spi_bus_add_device(HSPI_HOST, &dev_cfg, &spi_device));
ESP_ERROR_CHECK(spi_bus_add_device(SPI2_HOST, &dev_cfg, &spi_device));
ESP_ERROR_CHECK(sx127x_create(spi_device, &device));
ESP_ERROR_CHECK(sx127x_set_opmod(SX127x_MODE_SLEEP, SX127x_MODULATION_FSK, device));

Expand Down
4 changes: 0 additions & 4 deletions examples/transmit_fsk/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO2, device, GPIO_INTR_POSEDGE);

tx_callback(device);

while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
4 changes: 0 additions & 4 deletions examples/transmit_fsk_beacon/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,4 @@ void app_main() {
ESP_ERROR_CHECK(sx127x_fsk_ook_tx_start_beacon(payload, sizeof(payload), 1000, device));
vTaskDelay(10000 / portTICK_PERIOD_MS);
ESP_ERROR_CHECK(sx127x_fsk_ook_tx_stop_beacon(device));

while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
4 changes: 0 additions & 4 deletions examples/transmit_fsk_fixed/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO2, device, GPIO_INTR_POSEDGE);

tx_callback(device);

while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
4 changes: 0 additions & 4 deletions examples/transmit_lora/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,4 @@ void app_main() {
ESP_ERROR_CHECK(sx127x_lora_tx_set_explicit_header(&header, device));

tx_callback(device);

while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
4 changes: 0 additions & 4 deletions examples/transmit_lora_implicit_header/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,4 @@ void app_main() {
ESP_ERROR_CHECK(sx127x_lora_tx_set_for_transmission(data, sizeof(data), device));
ESP_ERROR_CHECK(sx127x_set_opmod(SX127x_MODE_TX, SX127x_MODULATION_LORA, device));
ESP_LOGI(TAG, "transmitting");

while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}
4 changes: 0 additions & 4 deletions examples/transmit_ook/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,4 @@ void app_main() {
setup_gpio_interrupts((gpio_num_t)DIO2, device, GPIO_INTR_POSEDGE);

tx_callback(device);

while (1) {
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
}

0 comments on commit ea432a8

Please sign in to comment.