Programmable Clock with RTOS 0.0.1
Implementaiton of a programmable clock using RTOS with STM32GO microcontroller.
Loading...
Searching...
No Matches
bsp.h File Reference

Init the structs Inicialization of structs with Data, Time and Alarm values. More...

#include "FreeRTOS.h"
#include "SEGGER_RTT.h"
#include "stm32g0xx.h"
#include "task.h"
#include "queue.h"
#include "timers.h"
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  NEW_MsgTypeDef
 Struct with array to queue. More...
 
struct  _APP_TmTypeDef
 Struct with the date, time and alarm elements. More...
 
struct  _APP_MsgTypeDef
 Struct with the msg element. More...
 

Typedefs

typedef struct _APP_TmTypeDef APP_TmTypeDef
 Struct with the date, time and alarm elements.
 
typedef struct _APP_MsgTypeDef APP_MsgTypeDef
 Struct with the msg element.
 

Enumerations

enum  APP_Messages {
  SERIAL_MSG_ALARM , SERIAL_MSG_DATE , SERIAL_MSG_TIME , CLOCK_MSG_PRINT ,
  OK_STATE , ERROR_STATE , DISPLAY_MSG_ALARM_A , DISPLAY_ALARM
}
 Enum with message types used as events. More...
 
enum  Display_M {
  DISPLAY_MSG_TIME , DISPLAY_IDLE_STATE , DISPLAY_1 , DISPLAY_2 ,
  DISPLAY_3
}
 Enum with message types used as events for unit testing. More...
 
enum  MACHINE_State {
  CLOCK_STATE_ALARM , CLOCK_STATE_DATE , CLOCK_STATE_TIME , CLOCK_STATE_PRINT ,
  CLOCK_STATE_IDLE
}
 Enum with states for state machines. More...
 

Variables

FDCAN_HandleTypeDef CANHandler
 Structure type variable for CAN handler.
 
QueueHandle_t serialQueue
 Serial Queue identifier to use in the serial machine.
 
QueueHandle_t clockQueue
 Serial Queue identifier to use in the clock machine.
 
QueueHandle_t displayQueue
 Serial Queue identifier to use in the display machine.
 
TimerHandle_t xTimerDisplay
 Struct for handling Software timer.
 
RTC_HandleTypeDef RtcHandler
 Struct for handling RTC peripheral Declared in bsp.
 

Detailed Description

Init the structs Inicialization of structs with Data, Time and Alarm values.

Enumeration Type Documentation

◆ APP_Messages

Enum with message types used as events.

Enumerator
SERIAL_MSG_ALARM 

Received Alarm message type

SERIAL_MSG_DATE 

Received Date message type

SERIAL_MSG_TIME 

Received Time message type

CLOCK_MSG_PRINT 

Print clock data message type

OK_STATE 

Ok state of data

ERROR_STATE 

Error state of data

DISPLAY_MSG_ALARM_A 

Message alarm A

DISPLAY_ALARM 

Display Alarm!!!

◆ Display_M

enum Display_M

Enum with message types used as events for unit testing.

Enumerator
DISPLAY_MSG_TIME 

Received Time message type

DISPLAY_IDLE_STATE 

Received Date message type

DISPLAY_1 

Return for Alarm_A

DISPLAY_2 

Return for Alarm

DISPLAY_3 

Return for Alarm_Clean

◆ MACHINE_State

Enum with states for state machines.

Enumerator
CLOCK_STATE_ALARM 

Clock machine state for set alarm

CLOCK_STATE_DATE 

Clock machine state for set date

CLOCK_STATE_TIME 

Clock machine state for set time

CLOCK_STATE_PRINT 

Clock machine state for set print

CLOCK_STATE_IDLE 

Clock machine state idle