?? headset_ledmanager.h
字號:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004
FILE NAME
headset_LEDmanager.h
DESCRIPTION
*/
#ifndef HEADSET_LED_MANAGER_H
#define HEADSET_LED_MANAGER_H
#include "headset_private.h"
#include "headset_states.h"
#include "headset_events.h"
/*the event message sent on completeion of an event */
typedef struct
{
uint16 Event ;
bool PatternCompleted ;
} LMEndMessage_t;
/*used for a request to set the power on/off pin*/
typedef enum PowerPinTag{
POWER_OFF = 0,
POWER_ON = 1
}PowerPin_t ;
/*
FUNCTION PROTOTYPES
*/
/****************************************************************************
NAME
LEDManagerInit
DESCRIPTION
Initialisation function for the LED's manager module
RETURNS
Task
*/
void LEDManagerInit ( LedTaskData * ptheLEDTask ) ;
/****************************************************************************
NAME
LEDManagerAddLEDStatePattern
DESCRIPTION
Adds a state LED mapping
RETURNS
void
*/
void LEDManagerAddLEDStatePattern ( LedTaskData * ptheLEDTask , headsetState pState , LEDPattern_t* pPattern ) ;
/****************************************************************************
NAME
LEDManagerAddLEDFilter
DESCRIPTION
Adds an event LED mapping
RETURNS
void
*/
void LEDManagerAddLEDFilter ( LedTaskData * ptheLEDTask , LEDFilter_t* pLedFilter ) ;
/****************************************************************************
NAME
LEDManagerAddFilterPattern
DESCRIPTION
Adds an event LED mapping
RETURNS
void
*/
void LEDManagerAddLEDEventPattern ( LedTaskData * ptheLEDTask , headsetEvents_t pEvent , LEDPattern_t* pPattern ) ;
/****************************************************************************
NAME
LedManagerClean
DESCRIPTION
Frees all memory malloced on initialisation of the LED manager - to be called for clean
shutdown
RETURNS
void
*/
void LEDManagerClean ( LedTaskData * ptheLEDTask ) ;
void LEDManagerSetPowerPin ( hsTaskData * pApp , PowerPin_t pEnable ) ;
void LEDManagerSetMicBias ( hsTaskData * pApp , bool pEnable ) ;
void LedManagerSetPIO ( uint16 pPIO , bool pOnOrOff ) ;
/*debug function to print out the LED/*/
void LMPrintPattern ( LEDPattern_t * pLED ) ;
/*
Leds abstraction functions
*/
void LEDManagerIndicateEvent ( LedTaskData * pLEDTask , MessageId pEvent ) ;
void LEDManagerIndicateState ( LedTaskData * pLEDTask , headsetState pState ) ;
/*methods to enable / disable LED indications*/
void LedManagerDisableLEDS ( LedTaskData * pTask ) ;
void LedManagerEnableLEDS ( LedTaskData * pTask ) ;
void LedManagerToggleLEDS ( LedTaskData * pTask ) ;
/****************************************************************************
NAME
LedManagerResetLEDIndications
DESCRIPTION
Resets the LED Indications and reverts to state indications
Sets the Flag to allow the Next Event to interrupt the current LED Indication
Used if you have a permanent LED event indication that you now want to interrupt
RETURNS
void
*/
void LedManagerResetLEDIndications ( LedTaskData * pTask ) ;
/****************************************************************************
NAME
LEDManagerResetStateIndNumRepeatsComplete
DESCRIPTION
Resets the LED Number of Repeats complete for the current state indication
This allows the time of the led indication to be reset every time an event
occurs.
RETURNS
void
*/
void LEDManagerResetStateIndNumRepeatsComplete ( LedTaskData * pTask ) ;
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -