mixer-slider/protocol/master/master.h
2020-11-01 16:14:56 +01:00

37 lines
645 B
C

/*
* master.h
*
* Created on: 06.12.2018
* Author: julian
*/
#ifndef __DSPLAB_COMMON_MASTER_H__
#define __DSPLAB_COMMON_MASTER_H__
#include "../slave/slave.h"
#ifdef __cplusplus
extern "C" {
#endif
// how many channels we can encounter AT MOST
#define MAX_CHAIN_LEN 10
// this structure defines one complete chain
typedef struct {
iface_t * iface;
message_t buffer[MAX_CHAIN_LEN];
int chain_len; //< measured chainlength
int msg_byte_counter; //< bytecounter of receiver
} master_t;
void master_init(master_t *master, iface_t * dev);
#ifdef __cplusplus
} // end extern "C"
#endif
#endif /* __DSPLAB_COMMON_MASTER_H__ */