<p>tsaitgaist has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/simtrace2/+/15650">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">define LEDs for octsimtest<br><br>the OctSIM tester has only one amber LED.<br>this is now mapped to the normally green LED, used for activity.<br>because the LED is driven by an NPN transistor (as open collector)<br>instead of being directly connected to the pin (as open collector)<br>like on the other boards, the logic is inverted.<br>since normally the LED is on on idle and blinks during activity,<br>it will now be off on idle an only blink on activity (unless the<br>code is extended to cope with the possible inverted logic).<br>because there is no second LED but the current code requires one,<br>I mapped is to an unused pin.<br><br>the octosimtest target still does not compile completely, but at<br>least the LED issue is fixed.<br><br>Change-Id: I1296833bef2804c611640fcf4756e47905660e7b<br>---<br>M firmware/libboard/octsimtest/include/board.h<br>1 file changed, 16 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/50/15650/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/firmware/libboard/octsimtest/include/board.h b/firmware/libboard/octsimtest/include/board.h</span><br><span>index 2effc02..2e0f3c4 100644</span><br><span>--- a/firmware/libboard/octsimtest/include/board.h</span><br><span>+++ b/firmware/libboard/octsimtest/include/board.h</span><br><span>@@ -31,6 +31,22 @@</span><br><span> #define BOARD_MCK 58982400 // 18.432 * 16 / 5</span><br><span> </span><br><span> /** Pin configuration **/</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/** there is no red LED, but the code needs this second LED, thus we provide an unused pin */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PIO_LED_RED     PIO_PB13</span><br><span style="color: hsl(120, 100%, 40%);">+/** MCU pin connected to green LED, which is actually amber, and the logic is inverted since it is connected to an NPN transistor (used as open drain) */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PIO_LED_GREEN   PIO_PA4</span><br><span style="color: hsl(120, 100%, 40%);">+/** red LED pin definition */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PIN_LED_RED     {PIO_LED_RED, PIOB, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT}</span><br><span style="color: hsl(120, 100%, 40%);">+/** green LED pin definition */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PIN_LED_GREEN   {PIO_LED_GREEN, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}</span><br><span style="color: hsl(120, 100%, 40%);">+/** LEDs pin definition */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PINS_LEDS       PIN_LED_RED, PIN_LED_GREEN </span><br><span style="color: hsl(120, 100%, 40%);">+/** index for red LED in LEDs pin definition array */</span><br><span style="color: hsl(120, 100%, 40%);">+#define LED_NUM_RED     0</span><br><span style="color: hsl(120, 100%, 40%);">+/** index for green LED in LEDs pin definition array */</span><br><span style="color: hsl(120, 100%, 40%);">+#define LED_NUM_GREEN   1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Button to force bootloader start (shorted to ground when pressed */</span><br><span> #define PIN_BOOTLOADER_SW      {PIO_PA5, PIOA, ID_PIOA, PIO_INPUT, PIO_PULLUP}</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/simtrace2/+/15650">change 15650</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/simtrace2/+/15650"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: simtrace2 </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1296833bef2804c611640fcf4756e47905660e7b </div>
<div style="display:none"> Gerrit-Change-Number: 15650 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: tsaitgaist <kredon@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>