From 37bb0cf06553355ba58edffc61c5808fd8481586 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 7 Dec 2020 11:30:36 -0500 Subject: [PATCH] tiny/usiTwiSlave.h/c : Make usi_onRequestPtr,usi_onRecievePtr extern and include to fix compilation errors apparently caused by new version of compiler. --- control/tiny/usiTwiSlave.c | 5 ++++- control/tiny/usiTwiSlave.h | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/control/tiny/usiTwiSlave.c b/control/tiny/usiTwiSlave.c index b26f697..ee70f28 100644 --- a/control/tiny/usiTwiSlave.c +++ b/control/tiny/usiTwiSlave.c @@ -40,13 +40,16 @@ Change Activity: /******************************************************************************** includes ********************************************************************************/ - +#include #include #include #include "usiTwiSlave.h" //#include "../common/util.h" +//request_func_t _onTwiDataRequest = NULL; +request_func_t usi_onRequestPtr = NULL; +receive_func_t usi_onReceiverPtr = NULL; /******************************************************************************** device dependent defines diff --git a/control/tiny/usiTwiSlave.h b/control/tiny/usiTwiSlave.h index 8ffdda2..49ee717 100644 --- a/control/tiny/usiTwiSlave.h +++ b/control/tiny/usiTwiSlave.h @@ -36,6 +36,7 @@ Change Activity: + /******************************************************************************** includes @@ -52,17 +53,26 @@ Change Activity: ********************************************************************************/ + void usiTwiSlaveInit( uint8_t ); void usiTwiTransmitByte( uint8_t ); uint8_t usiTwiReceiveByte( void ); bool usiTwiDataInReceiveBuffer( void ); -void (*_onTwiDataRequest)(void); +//void (*_onTwiDataRequest)(void); + +//extern request_func_t _onTwiDataRequest; + bool usiTwiDataInTransmitBuffer(void); uint8_t usiTwiAmountDataInReceiveBuffer(void); // on_XXX handler pointers -void (*usi_onRequestPtr)(void); -void (*usi_onReceiverPtr)(uint8_t); +//void (*usi_onRequestPtr)(void); +//void (*usi_onReceiverPtr)(uint8_t); +typedef void (*request_func_t)(void); +typedef void (*receive_func_t)(uint8_t); + +extern request_func_t usi_onRequestPtr; +extern receive_func_t usi_onReceiverPtr; /********************************************************************************