45 lines
957 B
C++
45 lines
957 B
C++
|
|
#include "rf_transceiver.h"
|
|
|
|
static const char* tag = "trx433";
|
|
TaskHandle_t RF_Task_Handle;
|
|
|
|
const int txChannel = RMT_CHANNEL_0;
|
|
const int rxChannel = RMT_CHANNEL_1;
|
|
|
|
void Init_RF_Receiver(void)
|
|
{
|
|
/*
|
|
// Configure RMT receiver
|
|
rmt_config_t rxConfig;
|
|
rxConfig.channel = (rmt_channel_t)rxChannel;
|
|
rxConfig.gpio_num = static_cast<gpio_num_t>(RMT_RX_PIN);
|
|
// Set other reception settings as needed
|
|
rmt_config(&rxConfig);
|
|
rmt_driver_install(rxConfig.channel, 1000, 0);
|
|
|
|
xTaskCreatePinnedToCore(RF_Control_Task, "RF_Task", 8000, NULL, 1, &RF_Task_Handle, 0);
|
|
*/
|
|
}
|
|
|
|
void Init_RF_Transmitter(void)
|
|
{
|
|
/*
|
|
rmt_config_t txConfig;
|
|
txConfig.channel = (rmt_channel_t)txChannel;
|
|
txConfig.gpio_num = static_cast<gpio_num_t>(RMT_TX_PIN);
|
|
// Set other transmission settings as needed
|
|
rmt_config(&txConfig);
|
|
rmt_driver_install(txConfig.channel, 0, 0);
|
|
*/
|
|
}
|
|
|
|
void RF_Control_Task(void *parameters)
|
|
{
|
|
for(;;){
|
|
vTaskDelay(100);
|
|
}
|
|
}
|
|
|
|
|