Nordic: Enabled the invocation of twi_master.h functions from a cpp context

In a previous commit, the content of twi_master.h did not allow the invocation
of the c functions specified by the file from a cpp context. This commit wraps
the contents of the header file with the appropriate ifdefs.
pull/1267/head
James Devine 2015-07-24 16:34:43 +01:00 committed by Jonathan Austin
parent 50fca30a2f
commit 633b57e209
1 changed files with 9 additions and 0 deletions

View File

@ -13,6 +13,11 @@
#ifndef TWI_MASTER_H
#define TWI_MASTER_H
#ifdef __cplusplus
extern "C" {
#endif
/*lint ++flb "Enter library region" */
#include <stdbool.h>
@ -95,5 +100,9 @@ bool twi_master_transfer(uint8_t address, uint8_t *data, uint8_t data_length, bo
*@}
**/
#ifdef __cplusplus
}
#endif
/*lint --flb "Leave library region" */
#endif //TWI_MASTER_H