projet_voilier/keil_project/Services/RFOutput.h
Jasper Güldenstein cacd44d03d RFOutput docs
2020-11-15 16:07:08 +01:00

40 lines
1.3 KiB
C

/**
******************************************************************************
* @file RFOutput.h
* @author GALLOIS, Leonie and GÜLDENSTEIN, Jasper and FOUSSATS, Morgane
* @brief Service for using the RF Module to transmit characters.
******************************************************************************
*/
#ifndef RF_OUTPUT_INPUT_H
#define RF_OUTPUT_INPUT_H
#include "stm32f1xx_ll_bus.h"
#include "stm32f1xx_ll_usart.h"
#include "stm32f1xx_ll_gpio.h"
/**
* @brief Initialziation function for the RF_OUTPUT module.
* Peripherals used: USART1
* Pins used: PA9 (USART1 TX)
* PA11 (TX Enable)
*/
void RF_OUTPUT_Init(void);
/**
* @brief Transmits a given number of bytes from a buffer using the RF Module
* @param buf pointer to start of buffer to be transmitted
* @param len length of the data to be transmitted
*/
void RF_OUTPUT_SendBytes(char* buf, int len);
/**
* @brief Transmits a formatted string of the given parameters
* @param rouli_bon whether or not the angle is in an acceptable range
* @param alimentation_bon whether or not the battery voltage has acceptable level
* @param angle_voile opening angle of the sail between 0 and 90
*/
void RF_OUTPUT_SendMessage(int rouli_bon, int alimentation_bon, float angle_voile);
#endif