kopia lustrzana https://github.com/OpenRTX/OpenRTX
Add linux implementation of the platform API
rodzic
2350103831
commit
b434793baf
|
@ -27,3 +27,22 @@
|
||||||
#define GPIOI "PI"
|
#define GPIOI "PI"
|
||||||
#define GPIOJ "PJ"
|
#define GPIOJ "PJ"
|
||||||
#define GPIOK "PK"
|
#define GPIOK "PK"
|
||||||
|
|
||||||
|
/* Signalling LEDs */
|
||||||
|
#define GREEN_LED "GREEN_LED",0
|
||||||
|
#define RED_LED "RED_LED",1
|
||||||
|
|
||||||
|
/* Analog inputs */
|
||||||
|
#define AIN_VOLUME "AIN_VOLUME",0
|
||||||
|
#define AIN_VBAT "AIN_VBAT",1
|
||||||
|
#define AIN_MIC "AIN_MIC",3
|
||||||
|
#define AIN_RSSI "AIN_RSSI",0
|
||||||
|
|
||||||
|
/* Channel selection rotary encoder */
|
||||||
|
#define CH_SELECTOR_0 "CH_SELECTOR_0",14
|
||||||
|
#define CH_SELECTOR_1 "CH_SELECTOR_1",15
|
||||||
|
#define CH_SELECTOR_2 "CH_SELECTOR_2",10
|
||||||
|
#define CH_SELECTOR_3 "CH_SELECTOR_3",11
|
||||||
|
|
||||||
|
/* Push-to-talk switch */
|
||||||
|
#define PTT_SW "PTT_SW",11
|
||||||
|
|
|
@ -33,3 +33,70 @@ void platform_setBacklightLevel(uint8_t level)
|
||||||
{
|
{
|
||||||
printf("platform_setBacklightLevel(%u)\n", level);
|
printf("platform_setBacklightLevel(%u)\n", level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
float platform_getVbat(){
|
||||||
|
printf("platform_getVbat()\n");
|
||||||
|
return 0.69;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
float platform_getMicLevel(){
|
||||||
|
printf("platform_getMicLevel()\n");
|
||||||
|
return 0.69;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
float platform_getVolumeLevel(){
|
||||||
|
printf("platform_getVolumeLevel()\n");
|
||||||
|
return 0.69;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint8_t platform_getChSelector(){
|
||||||
|
printf("platform_getChSelector()\n");
|
||||||
|
return 42;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool platform_getPttStatus(){
|
||||||
|
printf("platform_getVbat()\n");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void platform_ledOn(led_t led){
|
||||||
|
char* str;
|
||||||
|
|
||||||
|
switch(led){
|
||||||
|
case 0:
|
||||||
|
str = "GREEN";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
str = "RED";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
str = "YELLOW";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
str = "WHITE";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("platform_ledOn(%s)\n", str);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void platform_ledOff(led_t led){
|
||||||
|
printf("platform_ledOff()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void platform_beepStart(uint16_t freq){
|
||||||
|
printf("platform_beepStart(%u)\n", freq);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void platform_beepStop(){
|
||||||
|
printf("platform_beepStop()\n");
|
||||||
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue