EPFLRocketTeam / 2024_I_AV_SW_TEENSY

0 stars 0 forks source link

Teensy Intranet Implementation #2

Open MrZebulon opened 3 months ago

MrZebulon commented 3 months ago

How will the Intranet Work ?

Read - The raw data is transferred from the bus to the read buffer asynchronously. The buffer is then read synchronously each tick.

Write - The packet is transformed into raw data and stored in the write buffer. For the teensy, the raw data in the buffer should be sent synchronously. It should also be possible to write asynchronously (e.g. upon receiving data)

UNIT TESTING PROCEDURE

Notes from SE

MrZebulon commented 3 months ago

Example Header (not complete)

void teensy_handleIntranetIn(int packetSize);

class BaseTeensyIntranet : public virtual BaseIntranetChannel {
public:

    // init function
    virtual void init() = 0;

    // not implemented, read async from channel
    bool readByte(uint8_t& byte) override { return false; }

};