Here is a snippet of my code. currString and currDot are out of scope in the watch window and mouse over will not show a variable. NOTE: This is C++.
STM32F4, and here is the gcc --version output
and
Display All
STM32F4, and here is the gcc --version output
Source Code
C Source Code
- /* Infinite loop */
- while (1) {
- int currLedString;
- for (currLedString = 0; currLedString < NoLedStrings; currLedString++) {
- struct ledString *currString = &ledStrings[currLedString];
- if (currString->changes) {
- currString->changes = 0;
- if (currString->mode == LedModeOff) {
- memset(&leds, 0, sizeof(leds));
- } else {
- // All other modes have a back ground color
- currString->backColor.parts.lead = 0xFF;
- volatile int ctr;
- for (ctr = 0; ctr <= MAX_LEDS; ctr++) { leds.led[ctr].raw = currString->backColor.raw; }
- for (ctr = 0; ctr < MaxLedDots; ctr++) {
- struct ledDot *currDot = &currString->dots[ctr];
- if (currDot->size > 0) {
- int pos;
- asm("nop");
- for (pos = (1 + currDot->pos - (currDot->size - 1));
- pos < (1 + currDot->pos + (currDot->size - 1)); pos++) {
- asm("nop");
- int delta = pos - currDot->pos; // How far from the center of the dot
- if (delta < 0)
- delta *= -1;
- delta++;