SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
Cmd Namespace Reference

A simple way to run commands over serial. More...

Functions

void setCommand (uint8_t command, CommandCallback callback)
 attach a single callback to a byte value that will be received over serial
 
int receiveCommand (void)
 receive any command from serial by matching incoming bytes to a callback
 

Detailed Description

A simple way to run commands over serial.

Function Documentation

◆ receiveCommand()

int Cmd::receiveCommand ( void  )

receive any command from serial by matching incoming bytes to a callback

Returns
int The byte received

◆ setCommand()

void Cmd::setCommand ( uint8_t  command,
CommandCallback  callback 
)

attach a single callback to a byte value that will be received over serial

Parameters
commandThe byte integer
callbackThe callback