/** * @file Key.h * @brief 4-bit keyboard connected to PB19-PB16 * @details Lab 5. Digital Piano using a Digital to Analog Converter
* For more information see
https://docs.google.com/document/d/1DVmHjqsx24FvLp4x8KKyr5UmDeDlBlfeQPsVvKFQF_k/edit
* @version ECE319K Spring 2024 * @author Your names go here * @copyright Lab solution, do not post, * @warning AS-IS * @date October 2, 2023
Pins on the 4-bit Keyboard
Pin GPIOHardware
PB19 inputbit 3 (note with highest frequency)
PB18 inputbit 2
PB17 inputbit 1
PB16 inputbit 0 (note with lowest frequency)
******************************************************************************/ #ifndef __KEY_H__ #define __KEY_H__ /** * Initialize 4-bit keyboard * - Piano key 3 PB19 (note with highest frequency) * - Piano key 2 PB18 * - Piano key 1 PB17 * - Piano key 0 PB16 (note with lowest frequency) * @param none * @return none * @brief Initialize keyboard * @note LaunchPad_Init has been called; this program should not reset Port B */ void Key_Init(void); /** * Input from piano key inputs on PB19-PB16 * @param none * @return 0 to 15 depending on keys * 0x01 is just Key0, 0x02 is just Key1, 0x04 is just Key2, 0x08 is just Key3 * */ uint32_t Key_In(void); #endif // __KEY_H__