Urbanite: Parking aid system
|
: Header for port_system.c file. More...
#include <stdint.h>
Functions | |
uint32_t | port_system_init (void) |
Initializes the system. | |
uint32_t | port_system_get_millis (void) |
Returns the number of milliseconds since the system started. More... | |
void | port_system_set_millis (uint32_t ms) |
Sets the number of milliseconds since the system started. More... | |
void | port_system_delay_ms (uint32_t ms) |
Delays the program execution for the specified number of milliseconds. More... | |
void | port_system_delay_until_ms (uint32_t *t, uint32_t ms) |
Delays the program execution until the specified number of milliseconds since the system started. More... | |
void | port_system_power_stop (void) |
Set the system in stop mode for low power consumption. More... | |
void | port_system_power_sleep (void) |
Set the system in sleep mode for low power consumption. More... | |
void | port_system_sleep (void) |
Enable low power consumption in sleep mode. More... | |
void | port_system_systick_resume (void) |
Resume Tick increment. More... | |
void | port_system_systick_suspend (void) |
Suspend Tick increment. More... | |
: Header for port_system.c file.
Josué Pagán Ortiz (j.pag) Sistemas Digitales II an@u pm.es
void port_system_delay_ms | ( | uint32_t | ms | ) |
Delays the program execution for the specified number of milliseconds.
ms | Number of milliseconds to delay. |
void port_system_delay_until_ms | ( | uint32_t * | t, |
uint32_t | ms | ||
) |
Delays the program execution until the specified number of milliseconds since the system started.
t | Pointer to the variable that stores the number of milliseconds to delay until. |
ms | Number of milliseconds to delay until. |
uint32_t port_system_get_millis | ( | void | ) |
Returns the number of milliseconds since the system started.
number | of milliseconds since the system started. |
void port_system_power_sleep | ( | void | ) |
Set the system in sleep mode for low power consumption.
The function sets the state of the power regulator in sleep mode.
After that, the function sets the system mode in sleep mode, to enter in sleep mode when calling __WFI()
(wait for interruption).
The system remains in this line until an external interruption or timer interruption occurs.
ONLY IF YOU NEED IT! TODO alumnos Version 4:
✅ 1. Copy the following code in the file stm32f4_system.c.
void port_system_power_stop | ( | void | ) |
Set the system in stop mode for low power consumption.
The function sets the state of the power regulator in stop mode.
After that, the function sets the system mode in sleep mode, to enter in stop mode when calling __WFI()
(wait for interruption).
The system remains in this line until an external interruption or timer interruption occurs.
If an interruption occurs the system wakes up and resets the system mode.
TODO alumnos Version 4:
✅ 1. Copy the following code in the file stm32f4_system.c.
void port_system_set_millis | ( | uint32_t | ms | ) |
Sets the number of milliseconds since the system started.
ms | New number of milliseconds since the system started. |
void port_system_sleep | ( | void | ) |
Enable low power consumption in sleep mode.
TODO alumnos Version 4:
✅ 1. Call function
port_system_systick_suspend()
to suspend the count of the SysTick.
✅ 2. Call functionport_system_power_sleep()
to enter sleep in sleep mode.
void port_system_systick_resume | ( | void | ) |
Resume Tick increment.
The SysTick timer is the source of time base. It is used to generate interrupts at regular time intervals. Once this function is called, the SysTick interrupt will be enabled and so Tick increment is resumed.
TODO alumnos Version 4:
✅ 1. Copy the following code in the file stm32f4_system.c.
void port_system_systick_suspend | ( | void | ) |
Suspend Tick increment.
The SysTick timer is the source of time base. It is used to generate interrupts at regular time intervals. Once this function is called, the SysTick interrupt will be disabled so it saves more energy and it does not generate any interruption.
TODO alumnos Version 4:
✅ 1. Copy the following code in the file stm32f4_system.c.