ACDC Senior Project v1.0.0
Senior Project for Textron Aviation
|
Implementation of timer functions for system clock speed and delay. More...
Macros | |
#define | MS_PER_SECOND 1000 |
#define | US_PER_MS 1000 |
Functions | |
void | TIMER_Init (SystemClockSpeed SCS_x) |
(SHOULD NOT BE CALLED BY USER, CALLED IN ACDC_CLOCK.h) Initilizes the SysClock timer and sets the value of SysClock->LOAD | |
void | TIMER_SetSystemClockSpeed (SystemClockSpeed SCS_x) |
(SHOULD NOT BE CALLED BY USER, CALLED IN ACDC_CLOCK.h) Sets the value for SysClock->LOAD | |
void | TIMER_PWM_Init (TIMx_CHx TIMx_CHx_Pxx, PWM_MODE PWM_MODE_x, uint32_t frequency) |
Initializes PWM output on the specified timer and channel with the given parameters. (Default duty cycle = 0) | |
void | TIMER_PWM_SetDuty (TIMx_CHx TIMx_CHx_Pxx, uint32_t dutyCycle) |
Sets the duty cycle of the PWM signal on the specified timer and channel. | |
uint32_t | TIMER_PWM_GetDuty (TIMx_CHx TIMx_CHx_Pxx) |
Retrieves the current duty cycle of the specified timer and channel. | |
uint32_t | TIMER_PWM_GetPeriod (TIMx_CHx TIMx_CHx_Pxx) |
Retrieves the period of the PWM signal on the specified timer. | |
void | SysTick_Handler (void) |
uint64_t | Millis () |
Grabs and returns the total number of milliseconds since the MCU turned on. | |
uint64_t | Micros () |
Grabs and returns the total number of microseconds since the MCU turned on. | |
void | Delay_MS (uint64_t delayVal) |
Pauses code execution for delayVal number of milliseconds. | |
void | Delay_US (uint64_t delayVal) |
Pauses code execution for delayVal number of microseconds. | |
Implementation of timer functions for system clock speed and delay.
#define MS_PER_SECOND 1000 |
#define US_PER_MS 1000 |
void Delay_MS | ( | uint64_t | delayVal | ) |
Pauses code execution for delayVal number of milliseconds.
delayVal | Number of milliseconds to delay for |
void Delay_US | ( | uint64_t | delayVal | ) |
Pauses code execution for delayVal number of microseconds.
delayVal | Number of microseconds to delay for |
uint64_t Micros | ( | ) |
Grabs and returns the total number of microseconds since the MCU turned on.
uint64_t Millis | ( | ) |
Grabs and returns the total number of milliseconds since the MCU turned on.
void SysTick_Handler | ( | void | ) |
void TIMER_Init | ( | SystemClockSpeed | SCS_x | ) |
(SHOULD NOT BE CALLED BY USER, CALLED IN ACDC_CLOCK.h) Initilizes the SysClock timer and sets the value of SysClock->LOAD
SCS_x | System Clock Speed (Ex. SCS_72Mhz, SCS_36Mhz, ...) |
Retrieves the current duty cycle of the specified timer and channel.
TIMx_CHx_Pxx | Struct containing configuration data for the specific timer and channel |
Retrieves the period of the PWM signal on the specified timer.
TIMx_CHx_Pxx | Struct containing configuration data for the specific timer and channel |
Initializes PWM output on the specified timer and channel with the given parameters. (Default duty cycle = 0)
TIMx_CHx_Pxx | Struct containing configuration data for the specific timer and channel |
PWM_MODE_x | Desired PWM mode |
frequency | Desired frequency (in Hz) for PWM to run at |
Sets the duty cycle of the PWM signal on the specified timer and channel.
TIMx_CHx_Pxx | Struct containing configuration data for the specific timer and channel |
dutyCycle | Duty cycle value in timer ticks. |
void TIMER_SetSystemClockSpeed | ( | SystemClockSpeed | SCS_x | ) |
(SHOULD NOT BE CALLED BY USER, CALLED IN ACDC_CLOCK.h) Sets the value for SysClock->LOAD
SCS_x | System Clock Speed (Ex. SCS_72Mhz, SCS_36Mhz, ...) |