Keisuke Sehara
/
STM32_Whisking
fast-feedback virtual target task code on STM Nucleo
core/random.h
- Committer:
- gwappa
- Date:
- 2018-07-05
- Revision:
- 26:b4421d1ee57a
- Parent:
- random.h@ 13:8ea85a33e37a
File content as of revision 26:b4421d1ee57a:
#ifndef RANDOM_H__ #define RANDOM_H__ #define RANDOM_NOISE_PIN PA_0 #include "inttypes.h" namespace random { typedef unsigned short uint16_t; const unsigned int MAX_RESOLUTION = 65535; void init(); uint32_t unif(const uint32_t& nlevels); uint32_t exponential(const uint32_t& tau, const uint32_t& cutoff, const unsigned int& resolution=MAX_RESOLUTION); } #endif