sccb.h 638 B

12345678910111213141516171819
  1. /*
  2. * This file is part of the OpenMV project.
  3. * Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
  4. * This work is licensed under the MIT license, see the file LICENSE for details.
  5. *
  6. * SCCB (I2C like) driver.
  7. *
  8. */
  9. #ifndef __SCCB_H__
  10. #define __SCCB_H__
  11. #include <stdint.h>
  12. int SCCB_Init(int pin_sda, int pin_scl);
  13. int SCCB_Deinit(void);
  14. uint8_t SCCB_Probe();
  15. uint8_t SCCB_Read(uint8_t slv_addr, uint8_t reg);
  16. uint8_t SCCB_Write(uint8_t slv_addr, uint8_t reg, uint8_t data);
  17. uint8_t SCCB_Read16(uint8_t slv_addr, uint16_t reg);
  18. uint8_t SCCB_Write16(uint8_t slv_addr, uint16_t reg, uint8_t data);
  19. #endif // __SCCB_H__