VSF Documented
Macros | Functions
LED_V2M-MPS2.c File Reference
#include "SMM_MPS2.h"
#include "Board_LED.h"

Macros

#define LED_PORT   MPS2_SCC->CFG_REG1
 
#define NUM_LEDS   (8) /* Number of available LEDs */
 

Functions

int32_t LED_Initialize (void)
 Initialize I/O interface for LEDs.
 
int32_t LED_Uninitialize (void)
 De-initialize I/O interface for LEDs.
 
int32_t LED_On (uint32_t num)
 Turn on a single LED indicated by num.
 
int32_t LED_Off (uint32_t num)
 Turn off a single LED indicated by num.
 
int32_t LED_SetOut (uint32_t val)
 Control all LEDs with the bit vector val.
 
uint32_t LED_GetCount (void)
 Get number of available LEDs on evaluation hardware.
 

Macro Definition Documentation

◆ LED_PORT

#define LED_PORT   MPS2_SCC->CFG_REG1

◆ NUM_LEDS

#define NUM_LEDS   (8) /* Number of available LEDs */

Function Documentation

◆ LED_Initialize()

int32_t LED_Initialize ( void  )

Initialize I/O interface for LEDs.

Returns
  • 0: function succeeded
  • -1: function failed

◆ LED_Uninitialize()

int32_t LED_Uninitialize ( void  )

De-initialize I/O interface for LEDs.

Returns
  • 0: function succeeded
  • -1: function failed

◆ LED_On()

int32_t LED_On ( uint32_t  num)

Turn on a single LED indicated by num.

Parameters
[in]numLED number
Returns
  • 0: function succeeded
  • -1: function failed

◆ LED_Off()

int32_t LED_Off ( uint32_t  num)

Turn off a single LED indicated by num.

Parameters
[in]numLED number
Returns
  • 0: function succeeded
  • -1: function failed

◆ LED_SetOut()

int32_t LED_SetOut ( uint32_t  val)

Control all LEDs with the bit vector val.

Parameters
[in]valeach bit represents the status of one LED.
Returns
  • 0: function succeeded
  • -1: function failed

◆ LED_GetCount()

uint32_t LED_GetCount ( void  )

Get number of available LEDs on evaluation hardware.

Returns
Number of available LEDs