/*
 * $Id: efm8_smb1.h 456 2019-06-16 02:47:43Z true $
 * begin 20190505 true
 */

#ifndef INC_DRIVER_EFM8_SMB1_H_
#define INC_DRIVER_EFM8_SMB1_H_



#include <SI_EFM8UB2_Register_Enums.h>
#include <stdint.h>



#define SMB1_IDLE 			0x00

#define SMB1_MR_STA_SENT	0x01
#define SMB1_MR_ADDR_SENT	0x02
#define SMB1_MR_READ_BYTE	0x03
#define SMB1_MR_DATA_READY	0x04

#define SMB1_MW_STA_SENT	0x11
#define SMB1_MW_ADDR_SENT	0x12
#define SMB1_MW_BYTE_SENT	0x13



void smb1_mwrite(uint8_t slave, char *buf, uint16_t bytes, void(*completed_callback)(uint8_t));
void smb1_mread(uint8_t slave, char *buf, uint16_t bytes, void(*completed_callback)(uint8_t));
uint8_t smb1_get_state();

void smb1_stop();

void smb1_interrupt();



#endif /* INC_DRIVER_EFM8_SMB1_H_ */
