Skip to content
Snippets Groups Projects
Commit 8dae46ed authored by Alvise de'Faveri's avatar Alvise de'Faveri
Browse files

Added the definition of a common interface between the two micros

parent 4a5c6a62
Branches
Tags
No related merge requests found
#pragma once
enum class AtmelCmd {
STATUS = 1,
STATUS_RESPONSE,
LAUNCH,
LAUNCH_RESPONSE,
ABORT
};
inline uint8_t atmelCmdToInt(AtmelCmd cmd) {
return static_cast<uint8_t>(cmd);
}
struct __attribute__((packed)) StatusResponse
{
uint8_t abort_cmd: 1; // abort after explicit command
uint8_t abort_timeout: 1; // abort after timeout
uint8_t abort_wrong_code: 1; // abort after wrong launch code recieved
uint8_t launch_done: 1;
};
const uint8_t launch_response_good = 0x55;
const uint8_t launch_response_bad = 0;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment