steering-wheel-stm/Core/Inc/vehicle.h

25 lines
570 B
C
Raw Permalink Normal View History

#ifndef __VEHICLE_H
#define __VEHICLE_H
#include "state.h"
2022-05-29 00:47:46 +02:00
#include "stm32g4xx_hal.h"
2022-08-17 08:48:09 +02:00
#include "stm32g4xx_hal_def.h"
#include "stm32g4xx_hal_fdcan.h"
#define CAN_ID_MISSION_SELECT 0x400
2022-08-17 08:48:09 +02:00
#define CAN_ID_BUTTONS 0x401
#define CAN_ID_AS_MISSION_FB 0x410
2022-08-17 08:48:09 +02:00
#define CAN_BUTTONS_LEFT (1 << 0)
#define CAN_BUTTONS_RIGHT (1 << 1)
#define CAN_BUTTONS_R2D (1 << 2)
#define CAN_BUTTONS_ENTER (1 << 3)
2022-05-29 00:47:46 +02:00
void vehicle_init(FDCAN_HandleTypeDef* handle);
2022-08-17 08:48:09 +02:00
HAL_StatusTypeDef vehicle_send_mission_select(Mission mission);
HAL_StatusTypeDef vehicle_send_buttons();
2022-05-29 00:47:46 +02:00
#endif // __VEHICLE_H