41 lines
707 B
C++
41 lines
707 B
C++
#include <atmel_start.h>
|
|
|
|
#include <utility_logging.hpp>
|
|
|
|
#include "radio_hw_instance.hpp"
|
|
#include "app_logging.hpp"
|
|
#include "skullc_samd21_hal.hpp"
|
|
|
|
namespace Hal = Peripherals::Hal::Samd;
|
|
|
|
namespace
|
|
{
|
|
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
/* Initializes MCU, drivers and middleware */
|
|
atmel_start_init();
|
|
|
|
gpio_set_pin_level(OUT_LED_TX, false);
|
|
|
|
App::Logging::setup();
|
|
|
|
radio::HwInstance* radio_hw = radio::HwInstance::create_instance();
|
|
|
|
/* Replace with your application code */
|
|
while (1)
|
|
{
|
|
gpio_toggle_pin_level(OUT_LED_RX);
|
|
|
|
const int16_t radio_num = radio_hw->register_read(0x1C);
|
|
|
|
SKULLC_LOG_INFO("Reg 0x1C: %d", radio_num);
|
|
|
|
gpio_toggle_pin_level(OUT_LED_TX);
|
|
|
|
delay_ms(1000);
|
|
}
|
|
}
|