Proper comments format

This commit is contained in:
Th3maz1ng 2023-05-14 22:12:26 +02:00
parent 6df9ab5aad
commit df4ab1f790

View File

@ -39,21 +39,51 @@ typedef struct CompassScreen
CompassLabel_t compassTemperature; CompassLabel_t compassTemperature;
} CompassScreen_t; } CompassScreen_t;
/* Initializes the compass screen context object */ /**
* @brief Initializes the compass screen object structure.
* @note This function has to be called first before any others.
*
* @param compassScreen a pointer to the compass screen object structure.
*/
void compass_screen_init(CompassScreen_t * const compassScreen); void compass_screen_init(CompassScreen_t * const compassScreen);
/* Set the compassAzimuth in degrees to show */ /**
* @brief Sets the azimuth in degrees (relative to the north) to show on the compass UI.
*
* @param compassScreen a pointer to the compass screen object structure.
* @param azimuth the azimuth in degrees (0 to 359) relative to north to show.
*/
void compass_screen_set_azimuth(CompassScreen_t * const compassScreen, uint16_t azimuth); void compass_screen_set_azimuth(CompassScreen_t * const compassScreen, uint16_t azimuth);
/* Set the compassTemperature in degrees celsius to show */ /**
* @brief Sets the temperature in degrees celsius to show on the compass UI.
*
* @param compassScreen a pointer to the compass screen object structure.
* @param temperature the temperature to display on the compass screen in degrees celsius.
*/
void compass_screen_set_temperature(CompassScreen_t * const compassScreen, float temperature); void compass_screen_set_temperature(CompassScreen_t * const compassScreen, float temperature);
/**
* @brief Returns true if the compass screen is currently being used and displayed.
*
* @param compassScreen a pointer to the compass screen object structure.
* @return true if the compass screen is being used .
* @return false if the compass screen is not being used/currently displayed.
*/
bool compass_screen_is_in_use(CompassScreen_t * const compassScreen); bool compass_screen_is_in_use(CompassScreen_t * const compassScreen);
/* Builds the compass screen graphically */ /**
* @brief Builds the compass screen graphically.
*
* @param compassScreen a pointer to the compass screen object structure.
*/
void compass_screen_create(CompassScreen_t * const compassScreen); void compass_screen_create(CompassScreen_t * const compassScreen);
/* Frees all resources used by the CompassScreen object */ /**
* @brief Frees all resources used by the CompassScreen object, to be called when discarding the compass screen.
*
* @param compassScreen a pointer to the compass screen object structure.
*/
void compass_screen_destroy(CompassScreen_t * const compassScreen); void compass_screen_destroy(CompassScreen_t * const compassScreen);
#endif // COMPASS_SCREEN_H #endif // COMPASS_SCREEN_H