SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
Heartbeat.h File Reference

Make one ECU tell the other it is alive. More...

#include <stdint.h>
#include <stdlib.h>

Go to the source code of this file.

Namespaces

namespace  Heartbeat
 A module used to both ensure a connection to both ECUs using CAN and to periodically run callbacks.
 

Typedefs

typedef void(* Heartbeat::beatFunc) (void)
 Function called each time the heart beats.
 

Functions

void Heartbeat::beginBeating ()
 begin sending a beat signal at a set interval
 
void Heartbeat::beginReceiving ()
 Set callback to receive beats over CAN.
 
int Heartbeat::checkBeat ()
 Poll if a beat has been received.
 
void Heartbeat::addCallback (beatFunc func)
 Add a callback to be run at each haertbeat.
 

Detailed Description

Make one ECU tell the other it is alive.

Author
IR
Version
0.1
Date
2021-03-19
See also
Heartbeat for more info
Heartbeat.def for configuration of this module

Definition in file Heartbeat.h.