Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
LUTs/LUTs.h@15:1c67f064278e, 2020-05-19 (annotated)
- Committer:
- lukeocarwright
- Date:
- Tue May 19 18:38:33 2020 +0000
- Revision:
- 15:1c67f064278e
- Parent:
- 14:9cfe0041cc4e
- Child:
- 21:60f01b17b0a6
Fixed Tri wavetable issue to get tri wave out. Added more slow debug elements.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lukeocarwright | 7:33cb5f2db1ee | 1 | #ifndef LUTs_H |
lukeocarwright | 7:33cb5f2db1ee | 2 | #define LUTs_H |
lukeocarwright | 7:33cb5f2db1ee | 3 | |
lukeocarwright | 7:33cb5f2db1ee | 4 | #include "mbed.h" |
lukeocarwright | 7:33cb5f2db1ee | 5 | #include "N5110.h" |
lukeocarwright | 7:33cb5f2db1ee | 6 | #include "Gamepad.h" |
lukeocarwright | 7:33cb5f2db1ee | 7 | |
lukeocarwright | 7:33cb5f2db1ee | 8 | /** LUTs class |
lukeocarwright | 7:33cb5f2db1ee | 9 | * @author Luke Cartwright, University of Leeds |
lukeocarwright | 7:33cb5f2db1ee | 10 | * @brief generates LUTs |
lukeocarwright | 7:33cb5f2db1ee | 11 | * @date May 2020 |
lukeocarwright | 7:33cb5f2db1ee | 12 | */ |
lukeocarwright | 14:9cfe0041cc4e | 13 | |
lukeocarwright | 7:33cb5f2db1ee | 14 | class LUTs |
lukeocarwright | 7:33cb5f2db1ee | 15 | { |
lukeocarwright | 7:33cb5f2db1ee | 16 | public: |
lukeocarwright | 7:33cb5f2db1ee | 17 | //constructor |
lukeocarwright | 7:33cb5f2db1ee | 18 | LUTs(); |
lukeocarwright | 7:33cb5f2db1ee | 19 | //destructior |
lukeocarwright | 7:33cb5f2db1ee | 20 | ~LUTs(); |
lukeocarwright | 7:33cb5f2db1ee | 21 | |
lukeocarwright | 7:33cb5f2db1ee | 22 | //methods |
lukeocarwright | 10:258a1eca02cc | 23 | void initial_wavetables(); |
lukeocarwright | 7:33cb5f2db1ee | 24 | void sin_wavetable(); |
lukeocarwright | 10:258a1eca02cc | 25 | void tri_wavetable(int pulsewidth); |
lukeocarwright | 11:6ae098535da9 | 26 | void pulse_wavetable(int pulsewidth); |
lukeocarwright | 7:33cb5f2db1ee | 27 | |
lukeocarwright | 7:33cb5f2db1ee | 28 | private: |
lukeocarwright | 7:33cb5f2db1ee | 29 | //variables |
lukeocarwright | 14:9cfe0041cc4e | 30 | double rem; |
lukeocarwright | 9:f6ba53e355a0 | 31 | float sin_d; |
lukeocarwright | 9:f6ba53e355a0 | 32 | uint16_t sin_u; |
lukeocarwright | 10:258a1eca02cc | 33 | float dif; |
lukeocarwright | 10:258a1eca02cc | 34 | uint16_t dif_u; |
lukeocarwright | 9:f6ba53e355a0 | 35 | int i; |
lukeocarwright | 10:258a1eca02cc | 36 | float rise_t; |
lukeocarwright | 11:6ae098535da9 | 37 | uint16_t rise_tu; |
lukeocarwright | 11:6ae098535da9 | 38 | uint16_t fall_tu; |
lukeocarwright | 11:6ae098535da9 | 39 | float up_t; |
lukeocarwright | 11:6ae098535da9 | 40 | int up_tu; |
lukeocarwright | 15:1c67f064278e | 41 | |
lukeocarwright | 15:1c67f064278e | 42 | //Methods |
lukeocarwright | 15:1c67f064278e | 43 | void tri_wav_results(); |
lukeocarwright | 7:33cb5f2db1ee | 44 | }; |
lukeocarwright | 7:33cb5f2db1ee | 45 | #endif |