PCF8574.h 663 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _PCF8474__H_
  2. #define _PCF8474__H_
  3. #include "i2c.h"
  4. #include <stdint.h>
  5. I2C_HandleTypeDef *I2C_PCF8574;
  6. /** Private Fonction*/
  7. HAL_StatusTypeDef read_I2C_PCF8574(uint8_t add, uint8_t *tab);
  8. HAL_StatusTypeDef write_I2C_PCF8574(uint8_t addresse, uint8_t *tab);
  9. /** Public Fonction*/
  10. void initPCF8574(I2C_HandleTypeDef *typ);
  11. /*
  12. * PAram addBit : la valeurs des bit A1 A2 A3:
  13. * 0 0 0 = 0;
  14. * 0 0 1 = 1;
  15. * 0 1 0 = 2;
  16. * ...
  17. */
  18. HAL_StatusTypeDef Read_PCF8574(uint8_t addBit, uint8_t* val);
  19. HAL_StatusTypeDef Write_PCF8574(uint8_t addBit,uint8_t val);
  20. HAL_StatusTypeDef Write_One_Bit_PCF8574(uint8_t addBit, uint8_t val, uint8_t Local);
  21. #endif