Skip to content

Commit

Permalink
V1.x LED library documentation update
Browse files Browse the repository at this point in the history
Add notes to Readme.md
  • Loading branch information
techpaul authored and jaenrig-ifx committed Jun 20, 2023
1 parent df88349 commit 1d06600
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
14 changes: 5 additions & 9 deletions libraries/LED/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| | | PC Services
| | | www.pcserviceselectronics.co.uk
**Version** | : | V1.0.4
**Updated** | : | February 2023
**Updated** | : | March 2023
Date | : | July 2018

Infineon XMC-for-Arduino LED Library, to assist in making board agnostic examples that
Expand Down Expand Up @@ -42,19 +42,20 @@ models of board so we end up with
XMC1100 XMC2GO | High | No | High
XMC1100 XMC H Bridge2GO | High| No | High
XMC1300 Boot Kit | Low | No | Low
XMC1300 Sense2GOL | Low| No | Low
XMC1300 Sense2GO | Low| No | Low
XMC1400 Arduino Kit | Low | Yes | High
XMC4200 Platform2Go | High| No | High
XMC4400 Platform2Go | High| No | High
XMC4700 Relax Kit | High| No | High
XMC4700 Relax Kit Lite | High| No | High

Library references a macro (#define) in pins_arduino.h, so on boards that have reversed to normal Arduino definition the library handles it and also handles when LED_BUILTIN is referenced and that board has different LED_BUILTIN operation to other LEDs. This way ALL references to ON or OFF using this library always works. (Added in V1.0.4)
** NOTE ** After Version 2.0 of XMC-for-Arduino, some boards were dropped (e.g. XMC1300 Sense2GO) they are still shown here for those using old versions of XMC-for-Arduino, and for history.

[Back to top](#table-of-contents)
### LEDs on Different Boards
Matrix of available on board LED names or LED they map to, known currently.

| LED Macro | XMC1100 <BR>Boot Kit | XMC1100 <BR>XMC2GO | XMC1100 <BR>HBRIDGE2GO | XMC1300 <BR>Boot Kit | XMC1300 <BR>Sense2GOL | XMC1400 <br>Arduino Kit | XMC4200 <br>Platform2Go | XMC4400 <br>Platform2Go | XMC4700 <BR>Relax Kit | XMC4700 <BR>Relax Kit Lite |
| LED Macro | XMC1100 <BR>Boot Kit | XMC1100 <BR>XMC2GO | XMC1100 <BR>HBRIDGE2GO | XMC1300 <BR>Boot Kit | XMC1300 <BR>Sense2GO | XMC1400 <br>Arduino Kit | XMC4200 <br>Platform2Go | XMC4400 <br>Platform2Go | XMC4700 <BR>Relax Kit | XMC4700 <BR>Relax Kit Lite |
| --- | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |
LED_BUILTIN | Y | LED1 | LED1 | LED1 | LED1 | Y | LED1 | LED1 | LED1 | LED1
LED1 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
Expand All @@ -77,11 +78,6 @@ operation this file must include a #define macro based on XMC_LED_ON as below -
/* On board LED is ON when digital output is 0, LOW, False, OFF */
#define XMC_LED_ON 0
~~~
Additionally there is an issue where LED_BUILTIN is not standard 1, HIGH, TRUE, ON is ON, so add extra define
~~~
/* On board LED_BUILTIN is NOT standard LED is ON when digital output is 0, LOW, False, OFF */
#define XMC_LED_BUILTIN_REVERSED 1
~~~
[Back to top](#table-of-contents)
## Known Limitations
This is meant for controlling hardware on board LEDs on the XMC1 and XMC4 series, if your
Expand Down
4 changes: 2 additions & 2 deletions libraries/LED/library.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name=LED
version=1.0.4
author=Infineon Technologies AG
author=Paul Carpenter, PC services, www.pcserviceselectronics.co.uk
maintainer=Infineon Technologies AG <www.infineon.com>
sentence=This library allows you to enable as well as control the on board LEDs of the XMC microcontrollers.
paragraph= This library allows you to enable as well as control the on boards LEDs on Infineon XMC boards, in a way that works across ANY board.
category=Other
url=https://github.com/Infineon/XMC-for-Arduino/tree/master/arm/libraries/LED
architectures=xmc,arm
architectures=xmc

0 comments on commit 1d06600

Please sign in to comment.