My LoRaWAN Signal Mapping MSc summer project. This is a copy of the actual repository with personal information removed.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LoRaWAN-Signal-Mapping/iot/main/peripheral.h

24 lines
921 B

#pragma once
/**
* Register a new SPI peripheral.
* @param pin_number The pin number of the device's chip select pin.
*/
void peripheral_register(uint8_t pin_number);
/**
* Allows the device with the given chip select pin to talk on the SPI bus.
* @param pin_number The pin number of the chip select pin of the device to allow to talk.
*/
void peripheral_unsilence(uint8_t pin_number);
/**
* Stops the device with the given chip select pin from talking on the SPI bus.
* @param pin_number The chip-select pin number of the device to stop.
*/
void peripheral_silence(uint8_t pin_number);
/**
* Switches the active device from one to another on the SPI bus.
* @param pin_number_old The chip-select pin number of the old device to switch out from.
* @param pin_number_new The chip-select pin number of the new device to switch in to.
*/
void peripheral_switch(uint8_t pin_number_old, uint8_t pin_number_new);