skl-tunnel/radio/include/radio_hw_instance.hpp

33 lines
649 B
C++

//
// Created by erki on 4.06.22.
//
#ifndef SKL_TUNNEL_RADIO_HW_INSTANCE_HPP
#define SKL_TUNNEL_RADIO_HW_INSTANCE_HPP
#include <hal_spi_m_sync.h>
namespace radio
{
struct HwInstance
{
HwInstance();
HwInstance(const HwInstance&) = delete;
HwInstance(HwInstance&&) = delete;
HwInstance& operator=(const HwInstance&) = delete;
HwInstance& operator=(HwInstance&&) = delete;
void irq_handler();
uint8_t register_read(uint8_t address);
void register_write(uint8_t address, const uint8_t value);
private:
spi_m_sync_descriptor* m_spi = nullptr;
io_descriptor* m_spi_io = nullptr;
};
}
#endif //SKL_TUNNEL_RADIO_HW_INSTANCE_HPP