Save 16 bytes
This commit is contained in:
13
app/dtmf.c
13
app/dtmf.c
@@ -171,18 +171,11 @@ bool DTMF_FindContact(const char *pContact, char *pResult)
|
|||||||
|
|
||||||
char DTMF_GetCharacter(const unsigned int code)
|
char DTMF_GetCharacter(const unsigned int code)
|
||||||
{
|
{
|
||||||
|
if (code <= KEY_9)
|
||||||
|
return '0' + code;
|
||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case KEY_0: return '0';
|
|
||||||
case KEY_1: return '1';
|
|
||||||
case KEY_2: return '2';
|
|
||||||
case KEY_3: return '3';
|
|
||||||
case KEY_4: return '4';
|
|
||||||
case KEY_5: return '5';
|
|
||||||
case KEY_6: return '6';
|
|
||||||
case KEY_7: return '7';
|
|
||||||
case KEY_8: return '8';
|
|
||||||
case KEY_9: return '9';
|
|
||||||
case KEY_MENU: return 'A';
|
case KEY_MENU: return 'A';
|
||||||
case KEY_UP: return 'B';
|
case KEY_UP: return 'B';
|
||||||
case KEY_DOWN: return 'C';
|
case KEY_DOWN: return 'C';
|
||||||
|
Reference in New Issue
Block a user