This library declares a generic communication driver interface, that should be used whenever the specifica of the communication hardware are not relevant for an implementation.

Global Type Declarations

Get_Send_Stop()

Prototype of a function that knows how to get the current state of the Send_Stop flag of a specific communication module.

typedef bool Get_Send_Stop( void *const com_module );

Set_Send_Stop()

Prototype of a function that knows how to set a new state for the Send_Stop flag of a specific communication module.

typedef void Set_Send_Stop( void *const com_module, bool const new_state );

Send_Stop()

Prototype of a function that knows how send a stop signal, using a specific communication module.

typedef void Send_Stop( void *const com_module );

Write_Wait()

Prototype of a function that knows how to (blocking) write a byte array, using a specific communication module.

typedef enum status_code Write_Wait( void *const com_module, uint16_t const address, uint8_t *const byte_array, uint16_t const cnt_bytes );

Com_Driver

Generic Driver Interface

struct Com_Driver {
            void          *com_module   ; //< specific com channel hardware module reference
            Get_Send_Stop *get_send_stop;
            Set_Send_Stop *set_send_stop;
            Send_Stop     *send_stop    ;
            Write_Wait    *write_wait   ;
};

Files in this library

Com_Driver.h Declarations of the Generic Communication Driver interface

Notes

This library is currently implemented for the Atmel Software Foundation only.

You can get rid of this dependency by

Examples

See the 07 SSD1306 OLED FeatherM0 ASF Tutorial on how to use the library.