/*
 * PCF8574.h V1.0
 *
 *  Created on: 14 mai 2019
 *      Author: e_rcluze
 */

#ifndef _PCF8474__H_
#define _PCF8474__H_

#include "i2c.h"
#include <stdint.h>





/** Private Fonction*/
HAL_StatusTypeDef read_I2C_PCF8574(uint8_t add, uint8_t *tab);

HAL_StatusTypeDef write_I2C_PCF8574(uint8_t addresse, uint8_t *tab);
/** Public Fonction*/

void initPCF8574(I2C_HandleTypeDef *typ);

/*
 * PAram addBit : la valeurs des bit A1 A2 A3:
 * 	0 0 0 = 0;
 * 	0 0 1 = 1;
 * 	0 1 0 = 2;
 * 	...
 */
HAL_StatusTypeDef Read_PCF8574(uint8_t addBit, uint8_t* val);
HAL_StatusTypeDef Write_PCF8574(uint8_t addBit,uint8_t val);
HAL_StatusTypeDef Write_One_Bit_PCF8574(uint8_t addBit, uint8_t val, uint8_t Local);



#endif
