1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

Added functions for PD-LED boards.

This commit is contained in:
Roy Eltham
2013-02-28 19:16:18 -08:00
parent 9715bdfd44
commit dec4955b15
2 changed files with 97 additions and 1 deletions

View File

@@ -537,7 +537,47 @@ PINPROC_API PRResult PRJTAGReadTDIMemory(PRHandle handle, uint16_t tableOffset,
/** Read the JTAG status register for the command complete bit and JTAG pin states. */
PINPROC_API PRResult PRJTAGGetStatus(PRHandle handle, PRJTAGStatus * status);
/** @} */ // End of DMD
/** @} */ // End of JTAG
// PD-LED
/**
* @defgroup pdled PD-LED Control
* @{
*/
typedef enum PRLEDRegisterType {
kPRLEDRegisterTypeLEDIndex = 0,
kPRLEDRegisterTypeColor = 1,
kPRLEDRegisterTypeFadeColor = 2,
kPRLEDRegisterTypeFadeRateLow = 3,
kPRLEDRegisterTypeFadeRateHigh = 4
} PRPDLEDRegisterType;
typedef struct PRLED {
uint8_t boardAddr;
uint8_t LEDIndex;
} PRLED;
typedef struct PRLEDRGB {
PRLED* pRedLED;
PRLED* pGreenLED;
PRLED* pBlueLED;
} PRLEDRGB;
/** Sets the color of a given PRLED. */
PINPROC_API PRResult PRLEDColor(PRHandle handle, PRLED * pLED, uint8_t color);
/** Sets the fade color and rate on a given PRLED. */
PINPROC_API PRResult PRLEDFade(PRHandle handle, PRLED * pLED, uint8_t fadeColor, uint16_t fadeRate);
/** Sets the color of a given PRLEDRGB. */
PINPROC_API PRResult PRLEDRGBColor(PRHandle handle, PRLEDRGB * pLED, uint32_t color);
/** Sets the fade color and rate on a given PRLEDRGB. */
PINPROC_API PRResult PRLEDRGBFade(PRHandle handle, PRLEDRGB * pLED, uint32_t fadeColor, uint16_t fadeRate);
/** @} */ // End of PD-LED
/** @cond */
PINPROC_EXTERN_C_END