37 lines
512 B
C
37 lines
512 B
C
/*
|
|
* slave.h
|
|
*
|
|
* contains a slave definition
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "../communication.h"
|
|
#include "../interface.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// this struct describes one chain in the link
|
|
typedef struct
|
|
{
|
|
iface_t * iface;
|
|
message_t state;
|
|
} slave_t;
|
|
|
|
// The slave will use this method to encode
|
|
// one adc sample
|
|
void slave_encode(iface_t *iface, int16_t s);
|
|
|
|
// initialize the slave
|
|
void slave_init(slave_t *slave, iface_t *iface);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
} // end extern "C"
|
|
#endif
|
|
|
|
|