diff --git a/platform/drivers/stubs/audio_stub.c b/platform/drivers/stubs/audio_stub.c new file mode 100644 index 00000000..1ef06715 --- /dev/null +++ b/platform/drivers/stubs/audio_stub.c @@ -0,0 +1,59 @@ +/*************************************************************************** + * Copyright (C) 2023 by Federico Amedeo Izzo IU2NUO, * + * Niccolò Izzo IU2KIN * + * Frederik Saraci IU2NRO * + * Silvano Seva IU2KWO * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, see * + ***************************************************************************/ + +#include +#include + + +void audio_init() +{ + +} + +void audio_terminate() +{ + +} + +void audio_connect(const enum AudioSource source, const enum AudioSink sink) +{ + (void) source; + (void) sink; +} + +void audio_disconnect(const enum AudioSource source, const enum AudioSink sink) +{ + (void) source; + (void) sink; +} + +bool audio_checkPathCompatibility(const enum AudioSource p1Source, + const enum AudioSink p1Sink, + const enum AudioSource p2Source, + const enum AudioSink p2Sink) + +{ + (void) p1Source; + (void) p1Sink; + (void) p2Source; + (void) p2Sink; + + return false; +} diff --git a/platform/drivers/stubs/cps_io_stub.c b/platform/drivers/stubs/cps_io_stub.c new file mode 100644 index 00000000..f44a1576 --- /dev/null +++ b/platform/drivers/stubs/cps_io_stub.c @@ -0,0 +1,173 @@ +/*************************************************************************** + * Copyright (C) 2023 by Federico Amedeo Izzo IU2NUO, * + * Niccolò Izzo IU2KIN * + * Frederik Saraci IU2NRO * + * Silvano Seva IU2KWO * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, see * + ***************************************************************************/ + +#include + + +int cps_open(char *cps_name) +{ + (void) cps_name; + + /* + * Return 0 as if the codeplug has been correctly opened to avoid having the + * system stuck in the attempt creating and then opening an empty codeplug. + */ + return 0; +} + +void cps_close() +{ + +} + +int cps_create(char *cps_name) +{ + (void) cps_name; + + return -1; +} + +int cps_readContact(contact_t *contact, uint16_t pos) +{ + (void) contact; + (void) pos; + + return -1; +} + +int cps_readChannel(channel_t *channel, uint16_t pos) +{ + (void) channel; + (void) pos; + + return -1; +} + +int cps_readBankHeader(bankHdr_t *b_header, uint16_t pos) +{ + (void) b_header; + (void) pos; + + return -1; +} + +int cps_readBankData(uint16_t bank_pos, uint16_t pos) +{ + (void) bank_pos; + (void) pos; + + return -1; +} + +int cps_writeContact(contact_t contact, uint16_t pos) +{ + (void) contact; + (void) pos; + + return -1; +} + +int cps_writeChannel(channel_t channel, uint16_t pos) +{ + (void) channel; + (void) pos; + + return -1; +} + +int cps_writeBankHeader(bankHdr_t b_header, uint16_t pos) +{ + (void) b_header; + (void) pos; + + return -1; +} + +int cps_writeBankData(uint32_t ch, uint16_t bank_pos, uint16_t pos) +{ + (void) ch; + (void) bank_pos; + (void) pos; + + return -1; +} + +int cps_insertContact(contact_t contact, uint16_t pos) +{ + (void) contact; + (void) pos; + + return -1; +} + +int cps_insertChannel(channel_t channel, uint16_t pos) +{ + (void) channel; + (void) pos; + + return -1; +} + +int cps_insertBankHeader(bankHdr_t b_header, uint16_t pos) +{ + (void) b_header; + (void) pos; + + return -1; +} + +int cps_insertBankData(uint32_t ch, uint16_t bank_pos, uint16_t pos) +{ + (void) ch; + (void) bank_pos; + (void) pos; + + return -1; +} + +int cps_deleteContact(uint16_t pos) +{ + (void) pos; + + return -1; +} + +int cps_deleteChannel(channel_t channel, uint16_t pos) +{ + (void) channel; + (void) pos; + + return -1; +} + +int cps_deleteBankHeader(uint16_t pos) +{ + (void) pos; + + return -1; +} + +int cps_deleteBankData(uint16_t bank_pos, uint16_t pos) +{ + (void) bank_pos; + (void) pos; + + return -1; +} diff --git a/platform/drivers/stubs/display_stub.c b/platform/drivers/stubs/display_stub.c new file mode 100644 index 00000000..e35622e3 --- /dev/null +++ b/platform/drivers/stubs/display_stub.c @@ -0,0 +1,70 @@ +/*************************************************************************** + * Copyright (C) 2023 by Federico Izzo IU2NUO, * + * Niccolò Izzo IU2KIN, * + * Silvano Seva IU2KWO * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, see * + ***************************************************************************/ + +#include +#include +#include + +#ifdef PIX_FMT_BW +static uint8_t frameBuffer[(((SCREEN_WIDTH * SCREEN_HEIGHT) / 8 ) + 1)]; +#else +static uint16_t frameBuffer[SCREEN_WIDTH * SCREEN_HEIGHT]; +#endif + + +void display_init() +{ + +} + +void display_terminate() +{ + +} + +void display_renderRows(uint8_t startRow, uint8_t endRow) +{ + (void) startRow; + (void) endRow; +} + +void display_render() +{ + +} + +bool display_renderingInProgress() +{ + return false; +} + +void *display_getFrameBuffer() +{ + return (void *) (frameBuffer); +} + +void display_setContrast(uint8_t contrast) +{ + (void) contrast; +} + +void display_setBacklightLevel(uint8_t level) +{ + (void) level; +} diff --git a/platform/drivers/stubs/inputStream_stub.c b/platform/drivers/stubs/inputStream_stub.c new file mode 100644 index 00000000..530ba1c3 --- /dev/null +++ b/platform/drivers/stubs/inputStream_stub.c @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright (C) 2023 by Federico Izzo IU2NUO, * + * Niccolò Izzo IU2KIN, * + * Silvano Seva IU2KWO * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, see * + ***************************************************************************/ + +#include + +streamId inputStream_start(const enum AudioSource source, + const enum AudioPriority prio, + stream_sample_t * const buf, + const size_t bufLength, + const enum BufMode mode, + const uint32_t sampleRate) +{ + (void) source; + (void) prio; + (void) buf; + (void) bufLength; + (void) mode; + (void) sampleRate; + + return -1; +} + +dataBlock_t inputStream_getData(streamId id) +{ + (void) id; + + dataBlock_t block; + block.data = NULL; + block.len = 0; + + return block; +} + +void inputStream_stop(streamId id) +{ + (void) id; +} diff --git a/platform/drivers/stubs/keyboard_stub.c b/platform/drivers/stubs/keyboard_stub.c new file mode 100644 index 00000000..36fcb8ac --- /dev/null +++ b/platform/drivers/stubs/keyboard_stub.c @@ -0,0 +1,36 @@ +/*************************************************************************** + * Copyright (C) 2023 by Federico Amedeo Izzo IU2NUO, * + * Niccolò Izzo IU2KIN * + * Frederik Saraci IU2NRO * + * Silvano Seva IU2KWO * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, see * + ***************************************************************************/ + +#include + +void kbd_init() +{ + +} + +void kbd_terminate() +{ + +} + +keyboard_t kbd_getKeys() +{ + return 0; +} diff --git a/platform/drivers/stubs/nvmem_stub.c b/platform/drivers/stubs/nvmem_stub.c new file mode 100644 index 00000000..4c3bd506 --- /dev/null +++ b/platform/drivers/stubs/nvmem_stub.c @@ -0,0 +1,71 @@ +/*************************************************************************** + * Copyright (C) 2023 by Federico Amedeo Izzo IU2NUO, * + * Niccolò Izzo IU2KIN * + * Frederik Saraci IU2NRO * + * Silvano Seva IU2KWO * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, see * + ***************************************************************************/ + +#include + + +void nvm_init() +{ + +} + +void nvm_terminate() +{ + +} + +void nvm_readCalibData(void *buf) +{ + (void) buf; +} + +void nvm_readHwInfo(hwInfo_t *info) +{ + (void) info; +} + +int nvm_readVfoChannelData(channel_t *channel) +{ + (void) channel; + + return -1; +} + +int nvm_readSettings(settings_t *settings) +{ + (void) settings; + + return -1; +} + +int nvm_writeSettings(const settings_t *settings) +{ + (void) settings; + + return -1; +} + +int nvm_writeSettingsAndVfo(const settings_t *settings, const channel_t *vfo) +{ + (void) settings; + (void) vfo; + + return -1; +} diff --git a/platform/drivers/stubs/outputStream_stub.c b/platform/drivers/stubs/outputStream_stub.c new file mode 100644 index 00000000..fc8922ef --- /dev/null +++ b/platform/drivers/stubs/outputStream_stub.c @@ -0,0 +1,63 @@ +/*************************************************************************** + * Copyright (C) 2021 - 2023 by Federico Amedeo Izzo IU2NUO, * + * Niccolò Izzo IU2KIN * + * Frederik Saraci IU2NRO * + * Silvano Seva IU2KWO * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, see * + ***************************************************************************/ + +#include + +streamId outputStream_start(const enum AudioSink destination, + const enum AudioPriority prio, + stream_sample_t * const buf, + const size_t length, + const enum BufMode mode, + const uint32_t sampleRate) +{ + (void) destination; + (void) prio; + (void) buf; + (void) length; + (void) mode; + (void) sampleRate; + + return -1; +} + +stream_sample_t *outputStream_getIdleBuffer(const streamId id) +{ + (void) id; + + return NULL; +} + +bool outputStream_sync(const streamId id, const bool bufChanged) +{ + (void) id; + (void) bufChanged; + + return false; +} + +void outputStream_stop(const streamId id) +{ + (void) id; +} + +void outputStream_terminate(const streamId id) +{ + (void) id; +} diff --git a/platform/drivers/stubs/radio_stub.c b/platform/drivers/stubs/radio_stub.c new file mode 100644 index 00000000..b0cf0c24 --- /dev/null +++ b/platform/drivers/stubs/radio_stub.c @@ -0,0 +1,78 @@ +/*************************************************************************** + * Copyright (C) 2023 by Federico Amedeo Izzo IU2NUO, * + * Niccolò Izzo IU2KIN * + * Frederik Saraci IU2NRO * + * Silvano Seva IU2KWO * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, see * + ***************************************************************************/ + +#include + + +void radio_init(const rtxStatus_t *rtxState) +{ + (void) rtxState; +} + +void radio_terminate() +{ + +} + +void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset) +{ + (void) vhfOffset; + (void) uhfOffset; +} + +void radio_setOpmode(const enum opmode mode) +{ + (void) mode; +} + +bool radio_checkRxDigitalSquelch() +{ + return false; +} + +void radio_enableRx() +{ + +} + +void radio_enableTx() +{ + +} + +void radio_disableRtx() +{ + +} + +void radio_updateConfiguration() +{ + +} + +float radio_getRssi() +{ + return -121.0f; // S1 level: -121dBm +} + +enum opstatus radio_getStatus() +{ + return OFF; +}