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@9:f6ba53e355a0, 2020-05-06 (annotated)
- Committer:
- lukeocarwright
- Date:
- Wed May 06 14:37:34 2020 +0000
- Revision:
- 9:f6ba53e355a0
- Parent:
- 7:33cb5f2db1ee
- Child:
- 10:258a1eca02cc
Outputted sin LUT in uint16_t with unit test using DEBUG macro. Allows direct writing of value to table to 16-bit DAC.
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 | 7:33cb5f2db1ee | 27 | void sin_wavetable(); |
lukeocarwright | 9:f6ba53e355a0 | 28 | //uint16_t get_sin(int i); |
lukeocarwright | 7:33cb5f2db1ee | 29 | |
lukeocarwright | 7:33cb5f2db1ee | 30 | private: |
lukeocarwright | 7:33cb5f2db1ee | 31 | //variables |
lukeocarwright | 9:f6ba53e355a0 | 32 | float rem; |
lukeocarwright | 9:f6ba53e355a0 | 33 | float sin_d; |
lukeocarwright | 9:f6ba53e355a0 | 34 | uint16_t sin_u; |
lukeocarwright | 9:f6ba53e355a0 | 35 | int i; |
lukeocarwright | 7:33cb5f2db1ee | 36 | |
lukeocarwright | 7:33cb5f2db1ee | 37 | }; |
lukeocarwright | 7:33cb5f2db1ee | 38 | #endif |