realtek-doc/sources/rtk-gp3000/include/dal/ca8277b/dal_ca8277b_led.h
2025-12-04 22:26:46 +05:00

144 lines
3.6 KiB
C
Executable file

/*
* Copyright (C) 2012 Realtek Semiconductor Corp.
* All Rights Reserved.
*
* This program is the proprietary software of Realtek Semiconductor
* Corporation and/or its licensors, and only be used, duplicated,
* modified or distributed under the authorized license from Realtek.
*
* ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER
* THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
*
* $Revision: 40351 $
* $Date: 2013-06-20 11:36:05 +0800 (星期四, 20 六月 2013) $
*
* Purpose : Definition those public LED APIs and its data type in the SDK.
*
* Feature : The file have include the following module and sub-modules
* (1) LED parameter settings
*/
#ifndef __DAL_CA8277B_LED_H__
#define __DAL_CA8277B_LED_H__
/*
* Include Files
*/
#include <common/rt_type.h>
#include <rtk/led.h>
/*
* Symbol Definition
*/
/*
* Data Declaration
*/
/*
* Function Declaration
*/
/* Function Name:
* dal_ca8277b_led_init
* Description:
* Initialize led module.
* Input:
* None
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* Note:
* Must initialize led module before calling any led APIs.
*/
extern int32
dal_ca8277b_led_init(void);
/* Function Name:
* dal_ca8277b_led_blinkRate_get
* Description:
* Get LED blinking rate
* Input:
* group - led blinking group
* Output:
* pBlinkRate - blinking rate.
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* There are 8 types of LED blinking rates at 32ms, 48ms, 64ms, 96ms, 128ms, 256ms, 512ms, and 1024ms.
*/
extern int32
dal_ca8277b_led_blinkRate_get(rtk_led_blinkGroup_t group, rtk_led_blink_rate_t *pBlinkRate);
/* Function Name:
* dal_ca8277b_led_blinkRate_set
* Description:
* Get LED blinking rate
* Input:
* group - led blinking group
* blinkRate - blinking rate.
* Output:
* None
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* There are 8 types of LED blinking rates at 32ms, 48ms, 64ms, 96ms, 128ms, 256ms, 512ms, and 1024ms.
*/
extern int32
dal_ca8277b_led_blinkRate_set(rtk_led_blinkGroup_t group, rtk_led_blink_rate_t blinkRate);
/* Function Name:
* dal_ca8277b_led_modeForce_get
* Description:
* Get Led group to congiuration force mode
* Input:
* ledIdx - LED index id.
* Output:
* pMode - LED force mode.
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* The API can get forced Led group mode.
* The force modes that can be set are as following:
* - LED_FORCE_BLINK,
* - LED_FORCE_OFF,
* - LED_FORCE_ON.
*/
extern int32
dal_ca8277b_led_modeForce_get(uint32 ledIdx, rtk_led_force_mode_t *pMode);
/* Function Name:
* dal_ca8277b_led_modeForce_set
* Description:
* Set Led group to congiuration force mode
* Input:
* ledIdx - LED index id.
* mode - LED force mode.
* Output:
* None
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* The API can get forced Led group mode.
* The force modes that can be set are as following:
* - LED_FORCE_NORMAL,
* - LED_FORCE_BLINK,
* - LED_FORCE_OFF,
* - LED_FORCE_ON.
*/
extern int32
dal_ca8277b_led_modeForce_set(uint32 ledIdx, rtk_led_force_mode_t mode);
#endif /* __DAL_CA8277B_LED_H__ */