fast-feedback virtual target task code on STM Nucleo

Dependencies:   mbed

Committer:
gwappa
Date:
Thu Dec 13 07:18:43 2018 +0000
Revision:
32:1416e015016c
Parent:
26:b4421d1ee57a
change to use the Staged state

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gwappa 0:f736749c33d2 1 #ifndef RANDOM_H__
gwappa 0:f736749c33d2 2 #define RANDOM_H__
gwappa 0:f736749c33d2 3
gwappa 0:f736749c33d2 4 #define RANDOM_NOISE_PIN PA_0
gwappa 13:8ea85a33e37a 5 #include "inttypes.h"
gwappa 0:f736749c33d2 6
gwappa 0:f736749c33d2 7 namespace random
gwappa 0:f736749c33d2 8 {
gwappa 0:f736749c33d2 9 typedef unsigned short uint16_t;
gwappa 0:f736749c33d2 10
gwappa 0:f736749c33d2 11 const unsigned int MAX_RESOLUTION = 65535;
gwappa 0:f736749c33d2 12
gwappa 0:f736749c33d2 13 void init();
gwappa 13:8ea85a33e37a 14 uint32_t unif(const uint32_t& nlevels);
gwappa 13:8ea85a33e37a 15 uint32_t exponential(const uint32_t& tau, const uint32_t& cutoff, const unsigned int& resolution=MAX_RESOLUTION);
gwappa 0:f736749c33d2 16 }
gwappa 0:f736749c33d2 17
gwappa 0:f736749c33d2 18 #endif