瀏覽代碼

Merge pull request #187 from ashtuchkin/fix-random

Fix compilation error with recent newlib/gcc versions because of random()
teensy4-core
Paul Stoffregen 8 年之前
父節點
當前提交
49769659ce
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. +1
    -1
      teensy3/WMath.cpp
  2. +1
    -1
      teensy3/WProgram.h

+ 1
- 1
teensy3/WMath.cpp 查看文件

seed = newseed; seed = newseed;
} }


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



+ 1
- 1
teensy3/WProgram.h 查看文件

void noTone(uint8_t pin); void noTone(uint8_t pin);


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

Loading…
取消
儲存