Midnight Sun Firmware
Loading...
Searching...
No Matches
drive_state_manager.h
1#pragma once
2
3/************************************************************************************************
4 * @file drive_state_manager.h
5 *
6 * @brief Header file for drive state manager
7 *
8 * @date 2025-07-22
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11
12/* Standard library Headers */
13#include <stdbool.h>
14
15/* Inter-component Headers */
16
17/* Intra-component Headers */
18
28typedef enum {
34
38typedef enum {
44
49
55
60
66
DriveStateRequest
Requests made to control the drive state.
Definition: drive_state_manager.h:38
void drive_state_manager_request(DriveStateRequest req)
Make a request to change the drive state.
Definition: drive_state_manager.c:26
DriveState
Drive states representing the current output.
Definition: drive_state_manager.h:28
DriveState drive_state_manager_get_state(void)
Get the current state of the drive controller.
Definition: drive_state_manager.c:47
void drive_state_manager_update(void)
Update the drive state based on the current request.
Definition: drive_state_manager.c:30
void drive_state_manager_init(void)
Initialize the drive state manager.
Definition: drive_state_manager.c:21
@ DRIVE_STATE_REQUEST_NONE
Definition: drive_state_manager.h:39
@ DRIVE_STATE_REQUEST_N
Definition: drive_state_manager.h:41
@ DRIVE_STATE_REQUEST_R
Definition: drive_state_manager.h:42
@ DRIVE_STATE_REQUEST_D
Definition: drive_state_manager.h:40
@ DRIVE_STATE_DRIVE
Definition: drive_state_manager.h:31
@ DRIVE_STATE_INVALID
Definition: drive_state_manager.h:29
@ DRIVE_STATE_NEUTRAL
Definition: drive_state_manager.h:30
@ DRIVE_STATE_REVERSE
Definition: drive_state_manager.h:32