Keisuke Sehara
/
STM32_Whisking
fast-feedback virtual target task code on STM Nucleo
Diff: random.h
- Revision:
- 0:f736749c33d2
- Child:
- 2:0c241937eabd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/random.h Mon May 14 14:12:32 2018 +0000 @@ -0,0 +1,16 @@ +#ifndef RANDOM_H__ +#define RANDOM_H__ + +#define RANDOM_NOISE_PIN PA_0 + +namespace random +{ + typedef unsigned short uint16_t; + + const unsigned int MAX_RESOLUTION = 65535; + + void init(); + uint16_t exponential(const uint16_t& tau_ms, const uint16_t& cutoff, const unsigned int& resolution=MAX_RESOLUTION); +} + +#endif \ No newline at end of file