Midnight Sun Firmware
Loading...
Searching...
No Matches
can_watchdog.h
1#pragma once
2
3/************************************************************************************************
4 * @file can_watchdog.h
5 *
6 * @brief Software watchdog library for the CAN bus
7 *
8 * @date 2024-12-23
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11
12/* Standard library Headers */
13
14/* Inter-component Headers */
15#include "log.h"
16
17/* Intra-component Headers */
18#include "can.h"
19
29typedef struct CanWatchDog {
30 uint16_t cycles_over;
31 uint16_t max_cycles;
32 bool missed;
34
41
48
55
62
63void clear_all_rx_received();
64void clear_fast_rx_received();
65void clear_medium_rx_received();
66void clear_slow_rx_received();
67
StatusCode check_fast_can_watchdogs()
Checks CAN watchdogs for messages in fast-cycle.
StatusCode check_all_can_watchdogs()
Checks all CAN watchdogs.
StatusCode check_medium_can_watchdogs()
Checks CAN watchdogs for messages in medium-cycle.
StatusCode check_slow_can_watchdogs()
Checks CAN watchdogs for messages in slow-cycle.
StatusCode
StatusCodes for various errors.
Definition: status.h:27
Software defined CAN watchdog.
Definition: can_watchdog.h:29
uint16_t cycles_over
Definition: can_watchdog.h:30
bool missed
Definition: can_watchdog.h:32
uint16_t max_cycles
Definition: can_watchdog.h:31