mirror of
https://github.com/OpenRTX/OpenRTX
synced 2026-08-08 12:29:06 -04:00
targets: linux: platform.c: apply clang-format
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
This commit is contained in:
parent
0793f0c213
commit
5a50737689
2 changed files with 26 additions and 24 deletions
|
|
@ -19,20 +19,17 @@
|
|||
*/
|
||||
mod17Calib_t mod17CalData;
|
||||
|
||||
|
||||
static const hwInfo_t hwInfo =
|
||||
{
|
||||
static const hwInfo_t hwInfo = {
|
||||
.vhf_maxFreq = 174,
|
||||
.vhf_minFreq = 136,
|
||||
.vhf_band = 1,
|
||||
.vhf_band = 1,
|
||||
.uhf_maxFreq = 480,
|
||||
.uhf_minFreq = 400,
|
||||
.uhf_band = 1,
|
||||
.name = "Linux",
|
||||
.hw_version = 1
|
||||
.uhf_band = 1,
|
||||
.name = "Linux",
|
||||
.hw_version = 1,
|
||||
};
|
||||
|
||||
|
||||
void platform_init()
|
||||
{
|
||||
nvm_init();
|
||||
|
|
@ -49,27 +46,33 @@ void platform_terminate()
|
|||
uint16_t platform_getVbat()
|
||||
{
|
||||
float voltage = emulator_state.vbat;
|
||||
if(voltage < 0.0f) voltage = 0.0f;
|
||||
if(voltage > 65.0f) voltage = 65.0f;
|
||||
return ((uint16_t) (voltage * 1000.0f));
|
||||
if (voltage < 0.0f)
|
||||
voltage = 0.0f;
|
||||
if (voltage > 65.0f)
|
||||
voltage = 65.0f;
|
||||
return ((uint16_t)(voltage * 1000.0f));
|
||||
}
|
||||
|
||||
uint8_t platform_getMicLevel()
|
||||
{
|
||||
float level = emulator_state.micLevel;
|
||||
if(level < 0.0f) level = 0.0f;
|
||||
if(level > 255.0f) level = 255.0f;
|
||||
if (level < 0.0f)
|
||||
level = 0.0f;
|
||||
if (level > 255.0f)
|
||||
level = 255.0f;
|
||||
|
||||
return ((uint8_t) level);
|
||||
return ((uint8_t)level);
|
||||
}
|
||||
|
||||
uint8_t platform_getVolumeLevel()
|
||||
{
|
||||
float level = emulator_state.volumeLevel;
|
||||
if(level < 0.0f) level = 0.0f;
|
||||
if(level > 255.0f) level = 255.0f;
|
||||
if (level < 0.0f)
|
||||
level = 0.0f;
|
||||
if (level > 255.0f)
|
||||
level = 255.0f;
|
||||
|
||||
return ((uint8_t) level);
|
||||
return ((uint8_t)level);
|
||||
}
|
||||
|
||||
int8_t platform_getChSelector()
|
||||
|
|
@ -96,12 +99,12 @@ bool platform_pwrButtonStatus()
|
|||
|
||||
void platform_ledOn(led_t led)
|
||||
{
|
||||
(void) led;
|
||||
(void)led;
|
||||
}
|
||||
|
||||
void platform_ledOff(led_t led)
|
||||
{
|
||||
(void) led;
|
||||
(void)led;
|
||||
}
|
||||
|
||||
void platform_beepStart(uint16_t freq)
|
||||
|
|
@ -119,10 +122,10 @@ datetime_t platform_getCurrentTime()
|
|||
datetime_t t;
|
||||
|
||||
time_t rawtime;
|
||||
struct tm * timeinfo;
|
||||
time ( &rawtime );
|
||||
struct tm *timeinfo;
|
||||
time(&rawtime);
|
||||
// radio expects time to be TZ-less, so use gmtime instead of localtime.
|
||||
timeinfo = gmtime ( &rawtime );
|
||||
timeinfo = gmtime(&rawtime);
|
||||
|
||||
t.hour = timeinfo->tm_hour;
|
||||
t.minute = timeinfo->tm_min;
|
||||
|
|
@ -138,7 +141,7 @@ datetime_t platform_getCurrentTime()
|
|||
|
||||
void platform_setTime(datetime_t t)
|
||||
{
|
||||
(void) t;
|
||||
(void)t;
|
||||
|
||||
printf("rtc_setTime(t)\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -324,7 +324,6 @@ platform/targets/MD-UV3x0/pinmap.h
|
|||
platform/targets/MD-UV3x0/platform.c
|
||||
platform/targets/Module17/pinmap.h
|
||||
platform/targets/Module17/platform.c
|
||||
platform/targets/linux/platform.c
|
||||
platform/targets/ttwrplus/platform.c
|
||||
platform/targets/ttwrplus/pmu.cpp
|
||||
tests/platform/boot_test.c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue