Sfoglia il codice sorgente

Merge pull request #187 from ashtuchkin/fix-random

Fix compilation error with recent newlib/gcc versions because of random()
main
Paul Stoffregen 8 anni fa
parent
commit
49769659ce
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +1
    -1
      teensy3/WMath.cpp
  2. +1
    -1
      teensy3/WProgram.h

+ 1
- 1
teensy3/WMath.cpp Vedi File

@@ -12,7 +12,7 @@ void srandom(uint32_t newseed)
seed = newseed;
}

uint32_t random(void)
int32_t random(void)
{
int32_t hi, lo, x;


+ 1
- 1
teensy3/WProgram.h Vedi File

@@ -50,7 +50,7 @@ void tone(uint8_t pin, uint16_t frequency, uint32_t duration = 0);
void noTone(uint8_t pin);

// WMath prototypes
uint32_t random(void);
int32_t random(void);
uint32_t random(uint32_t howbig);
int32_t random(int32_t howsmall, int32_t howbig);
void randomSeed(uint32_t newseed);

Loading…
Annulla
Salva