Skip to content

Commit

Permalink
add led indices to am_bsp.h
Browse files Browse the repository at this point in the history
This adds macros to correlate LED names to indices within the am_bsp_psLEDs array. Helpful when standardizing on usage of the ambiq devices LED interface
  • Loading branch information
Owen L - SFE committed Dec 19, 2019
1 parent 6f41eee commit 73e4ee1
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 0 deletions.
Binary file modified artemis/bsp/gcc/bin/libam_bsp.a
Binary file not shown.
5 changes: 5 additions & 0 deletions artemis_thing_plus/bsp/am_bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ extern am_devices_button_t am_bsp_psButtons[AM_BSP_NUM_BUTTONS];
#define AM_BSP_NUM_LEDS 1
extern am_devices_led_t am_bsp_psLEDs[AM_BSP_NUM_LEDS];

// LED Device Array Indices
#define AM_BSP_LED0 0
#define AM_BSP_LED_BLUE AM_BSP_LED0

// Corresponding GPIO Numbers
#define AM_BSP_GPIO_LED AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED0 AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED18 AM_BSP_GPIO_LED_BLUE
Expand Down
Binary file modified artemis_thing_plus/bsp/gcc/bin/libam_bsp.a
Binary file not shown.
Binary file modified artmbed/bsp/gcc/bin/libam_bsp.a
Binary file not shown.
12 changes: 12 additions & 0 deletions edge/bsp/am_bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ extern am_devices_button_t am_bsp_psButtons[AM_BSP_NUM_BUTTONS];
#define AM_BSP_NUM_LEDS 4
extern am_devices_led_t am_bsp_psLEDs[AM_BSP_NUM_LEDS];

// LED Device Array Indices
#define AM_BSP_LED0 0
#define AM_BSP_LED1 1
#define AM_BSP_LED2 2
#define AM_BSP_LED3 3

#define AM_BSP_LED_RED AM_BSP_LED0
#define AM_BSP_LED_BLUE AM_BSP_LED1
#define AM_BSP_LED_GREEN AM_BSP_LED2
#define AM_BSP_LED_YELLOW AM_BSP_LED3

// Corresponding GPIO Numbers
#define AM_BSP_GPIO_LED0 AM_BSP_GPIO_LED_RED
#define AM_BSP_GPIO_LED1 AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED2 AM_BSP_GPIO_LED_GREEN
Expand Down
Binary file modified edge/bsp/gcc/bin/libam_bsp.a
Binary file not shown.
12 changes: 12 additions & 0 deletions edge2/bsp/am_bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ extern "C"
#define AM_BSP_NUM_LEDS 4
extern am_devices_led_t am_bsp_psLEDs[AM_BSP_NUM_LEDS];

// LED Device Array Indices
#define AM_BSP_LED0 0
#define AM_BSP_LED1 1
#define AM_BSP_LED2 2
#define AM_BSP_LED3 3

#define AM_BSP_LED_RED AM_BSP_LED0
#define AM_BSP_LED_BLUE AM_BSP_LED1
#define AM_BSP_LED_GREEN AM_BSP_LED2
#define AM_BSP_LED_YELLOW AM_BSP_LED3

// Corresponding GPIO Numbers
#define AM_BSP_GPIO_LED0 AM_BSP_GPIO_LED_RED
#define AM_BSP_GPIO_LED1 AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED2 AM_BSP_GPIO_LED_GREEN
Expand Down
Binary file modified edge2/bsp/gcc/bin/libam_bsp.a
Binary file not shown.
5 changes: 5 additions & 0 deletions redboard_artemis/bsp/am_bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ extern "C"
#define AM_BSP_NUM_LEDS 1
extern am_devices_led_t am_bsp_psLEDs[AM_BSP_NUM_LEDS];

// LED Device Array Indices
#define AM_BSP_LED0 0
#define AM_BSP_LED_BLUE AM_BSP_LED0

// Corresponding GPIO Numbers
#define AM_BSP_GPIO_LED AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED0 AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED13 AM_BSP_GPIO_LED_BLUE
Expand Down
Binary file modified redboard_artemis/bsp/gcc/bin/libam_bsp.a
Binary file not shown.
5 changes: 5 additions & 0 deletions redboard_artemis_atp/bsp/am_bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ extern "C"
#define AM_BSP_NUM_LEDS 1
extern am_devices_led_t am_bsp_psLEDs[AM_BSP_NUM_LEDS];

// LED Device Array Indices
#define AM_BSP_LED0 0
#define AM_BSP_LED_BLUE AM_BSP_LED0

// Corresponding GPIO Numbers
#define AM_BSP_GPIO_LED AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED0 AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED37 AM_BSP_GPIO_LED_BLUE
Expand Down
Binary file modified redboard_artemis_atp/bsp/gcc/bin/libam_bsp.a
Binary file not shown.
5 changes: 5 additions & 0 deletions redboard_artemis_nano/bsp/am_bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ extern "C"
#define AM_BSP_NUM_LEDS 1
extern am_devices_led_t am_bsp_psLEDs[AM_BSP_NUM_LEDS];

// LED Device Array Indices
#define AM_BSP_LED0 0
#define AM_BSP_LED_BLUE AM_BSP_LED0

// Corresponding GPIO Numbers
#define AM_BSP_GPIO_LED AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED0 AM_BSP_GPIO_LED_BLUE
#define AM_BSP_GPIO_LED19 AM_BSP_GPIO_LED_BLUE
Expand Down
Binary file modified redboard_artemis_nano/bsp/gcc/bin/libam_bsp.a
Binary file not shown.

0 comments on commit 73e4ee1

Please sign in to comment.