iot_boardled.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (c) 2021 Huawei Device Co., Ltd.
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. #ifndef __IOT_BOARDLED_H__
  16. #define __IOT_BOARDLED_H__
  17. /**
  18. * @brief Initialize the board pwd led
  19. * @return Returns 0 success while others failed
  20. */
  21. int BOARD_InitPwmLed(void);
  22. /**
  23. * @brief Set Pwm led duty cycle
  24. * @param dutyCycle, the duty cycle to set, not max than 40000
  25. * @return Returns 0 success while others failed
  26. */
  27. int BOARD_SetPwdLedDutyCycle(int dutyCycle);
  28. /**
  29. * @brief Initialize the LED
  30. * @return Returns 0 success while others failed
  31. */
  32. int BOARD_InitIoLed(void);
  33. /**
  34. * @brief Control the led status
  35. * @param status Indicates the status to set and value should be CN_BOARD_SWICT_ON/OFF
  36. * @return Returns 0 success while others failed
  37. */
  38. int BOARD_SetIoLedStatus(int status);
  39. /**
  40. * @brief use this function to change the flash cycle;
  41. * @param flashHz indicates the flash frequency
  42. * @return Returns 0 success while others failed
  43. */
  44. int LedFlashFrequencySet(float flashHz);
  45. /**
  46. * @brief use this function to kill the flash task
  47. * @return Returns 0 success while others failed
  48. */
  49. int LedFlashTaskDeinit(void);
  50. #endif /* __IOT_BOARDLED_H__ */