Last active
August 28, 2019 22:12
-
-
Save dambo1993/9dae35ec474ebc215eeea9f52b2f7659 to your computer and use it in GitHub Desktop.
enum with arrays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum rc_button | |
{ | |
RC_BUTTON_POWER, | |
RC_BUTTON_1, | |
RC_BUTTON_2, | |
RC_BUTTON_VOLUME_UP, | |
RC_BUTTON_VOLUME_DOWN, | |
RC_BUTTON_CNT, | |
}; | |
static rc_command_cb buttons_to_commands_mapping[RC_BUTTON_CNT] = | |
{ | |
[RC_BUTTON_POWER] = RC_COM_POWER_cb, | |
[RC_BUTTON_VOLUME_UP] = RC_SPEED_UP_cb, | |
[RC_BUTTON_VOLUME_DOWN] = RC_SPEED_DOWN_cb, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment