al_util.h 912 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright(c) 2013 S2Tek Technologies - All Rights Reserved.
  3. *
  4. * @file
  5. *
  6. * @brief
  7. */
  8. #ifndef __AL_UTIL_H__
  9. #define __AL_UTIL_H__
  10. #ifdef __cplusplus
  11. extern "C"{
  12. #endif
  13. typedef enum AL_LEDCommand {
  14. LED_OFF=0x0,//: turn off All LED light
  15. LED_ON=0xF,
  16. LED_NORMAL=0x10,
  17. LED_SECOND=0x20,
  18. LED_NORMAL_ON=0x11,//:turn on Normal LED light //Normal default define to Green
  19. LED_NORMAL_OFF=0x10,//:turn off Normal LED light
  20. LED_SECOND_ON=0x22,//:turn on Second LED light //Second default define to Red
  21. LED_SECOND_OFF=0x20,//:turn off Second LED light
  22. }AL_LED_CMD_t;
  23. INT8 AL_GPIO_READ(UINT8 index, UINT8 *pValue);
  24. INT8 AL_i2c_Read(UINT8 deviceID, UINT8 addr, UINT8 *pValue);
  25. INT8 AL_i2c_Write(UINT8 deviceID, UINT8 addr, UINT8 value);
  26. INT8 AL_gpio_WriteOnLevel(UINT8 PinNum);
  27. INT8 AL_gpio_WriteOffLevel(UINT8 PinNum);
  28. INT8 AL_SET_LED_Flash_Status(AL_LED_CMD_t LEDcmd);
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif