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@10:258a1eca02cc, 2020-05-06 (annotated)
- Committer:
- lukeocarwright
- Date:
- Wed May 06 19:51:22 2020 +0000
- Revision:
- 10:258a1eca02cc
- Parent:
- 9:f6ba53e355a0
- Child:
- 11:6ae098535da9
Added Triangle/saw LUT with debug test
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 | 9:f6ba53e355a0 | 8 | |
lukeocarwright | 7:33cb5f2db1ee | 9 | /** LUTs class |
lukeocarwright | 7:33cb5f2db1ee | 10 | * @author Luke Cartwright, University of Leeds |
lukeocarwright | 7:33cb5f2db1ee | 11 | * @brief generates LUTs |
lukeocarwright | 7:33cb5f2db1ee | 12 | * @date May 2020 |
lukeocarwright | 7:33cb5f2db1ee | 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 | //variables |
lukeocarwright | 9:f6ba53e355a0 | 23 | |
lukeocarwright | 9:f6ba53e355a0 | 24 | |
lukeocarwright | 7:33cb5f2db1ee | 25 | |
lukeocarwright | 7:33cb5f2db1ee | 26 | //methods |
lukeocarwright | 10:258a1eca02cc | 27 | void initial_wavetables(); |
lukeocarwright | 7:33cb5f2db1ee | 28 | void sin_wavetable(); |
lukeocarwright | 10:258a1eca02cc | 29 | void tri_wavetable(int pulsewidth); |
lukeocarwright | 7:33cb5f2db1ee | 30 | |
lukeocarwright | 7:33cb5f2db1ee | 31 | private: |
lukeocarwright | 7:33cb5f2db1ee | 32 | //variables |
lukeocarwright | 9:f6ba53e355a0 | 33 | float rem; |
lukeocarwright | 9:f6ba53e355a0 | 34 | float sin_d; |
lukeocarwright | 9:f6ba53e355a0 | 35 | uint16_t sin_u; |
lukeocarwright | 10:258a1eca02cc | 36 | float dif; |
lukeocarwright | 10:258a1eca02cc | 37 | uint16_t dif_u; |
lukeocarwright | 9:f6ba53e355a0 | 38 | int i; |
lukeocarwright | 10:258a1eca02cc | 39 | float rise_t; |
lukeocarwright | 10:258a1eca02cc | 40 | float fall_t; |
lukeocarwright | 7:33cb5f2db1ee | 41 | |
lukeocarwright | 7:33cb5f2db1ee | 42 | }; |
lukeocarwright | 7:33cb5f2db1ee | 43 | #endif |