Keisuke Sehara
/
STM32_Whisking
fast-feedback virtual target task code on STM Nucleo
core/random.h
- Committer:
- gwappa
- Date:
- 2018-12-13
- Revision:
- 32:1416e015016c
- Parent:
- 26:b4421d1ee57a
File content as of revision 32:1416e015016c:
#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