get mostly one directional comms working
This commit is contained in:
44
main/main.c
Normal file
44
main/main.c
Normal file
@@ -0,0 +1,44 @@
|
||||
#include <stdio.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "esp_log.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_mac.h"
|
||||
#include <string.h>
|
||||
#include "radio.h"
|
||||
#include "buscfg.h"
|
||||
#include "driver/spi_master.h"
|
||||
|
||||
#define TAG "canZem"
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
|
||||
ESP_LOGI("BOOT", "BRN Systems incorporated CanSat flight firmware build: %s %s", __DATE__, __TIME__);
|
||||
|
||||
spi_bus_config_t HighSpeedBusCfg = {
|
||||
// CONNECTED to LoRa and SD card
|
||||
.mosi_io_num = HSPI_MOSI_GPIO,
|
||||
.miso_io_num = HSPI_MISO_GPIO,
|
||||
.sclk_io_num = HSPI_SCK_GPIO,
|
||||
.quadwp_io_num = -1,
|
||||
.quadhd_io_num = -1,
|
||||
.max_transfer_sz = 64, // probably change
|
||||
};
|
||||
ESP_ERROR_CHECK(spi_bus_initialize(SPI3_HOST, &HighSpeedBusCfg, SPI_DMA_CH_AUTO));
|
||||
|
||||
xTaskCreate(
|
||||
lora_comms_task,
|
||||
"LoraCommsTask",
|
||||
8192,
|
||||
NULL,
|
||||
(tskIDLE_PRIORITY + 2),
|
||||
NULL);
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user