From 38231e3a53be5799b215b15c158bc686c5e93c1e Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Thu, 23 Sep 2021 20:50:47 +0200 Subject: [PATCH] Driver stubs for keyboard and non volatile memory on Module17 --- meson.build | 2 + platform/drivers/NVM/nvmem_Mod17.c | 81 ++++++++++++++++++++++ platform/drivers/keyboard/keyboard_Mod17.c | 43 ++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 platform/drivers/NVM/nvmem_Mod17.c create mode 100644 platform/drivers/keyboard/keyboard_Mod17.c diff --git a/meson.build b/meson.build index 2897c014..8adeaa7b 100644 --- a/meson.build +++ b/meson.build @@ -310,6 +310,8 @@ dm1801_def = def + mk22fn512_def + {'PLATFORM_DM1801': ''} ## mod17_src = src + stm32f405_src + ['platform/targets/Module17/platform.c', 'platform/drivers/display/SSD1306_Mod17.c', + 'platform/drivers/keyboard/keyboard_Mod17.c', + 'platform/drivers/NVM/nvmem_Mod17.c', 'platform/drivers/baseband/radio_Mod17.cpp', 'platform/drivers/audio/audio_Mod17.c'] diff --git a/platform/drivers/NVM/nvmem_Mod17.c b/platform/drivers/NVM/nvmem_Mod17.c new file mode 100644 index 00000000..64ecd741 --- /dev/null +++ b/platform/drivers/NVM/nvmem_Mod17.c @@ -0,0 +1,81 @@ +/*************************************************************************** + * Copyright (C) 2021 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_loadHwInfo(hwInfo_t *info) +{ + (void) info; +} + +int nvm_readVFOChannelData(channel_t *channel) +{ + (void) channel; + return -1; +} + +int nvm_readChannelData(channel_t *channel, uint16_t pos) +{ + (void) channel; + (void) pos; + return -1; +} + +int nvm_readZoneData(zone_t *zone, uint16_t pos) +{ + (void) zone; + (void) pos; + return -1; +} + +int nvm_readContactData(contact_t *contact, uint16_t pos) +{ + (void) contact; + (void) pos; + return -1; +} + +int nvm_readSettings(settings_t *settings) +{ + (void) settings; + return -1; +} + +int nvm_writeSettings(settings_t *settings) +{ + (void) settings; + return -1; +} + diff --git a/platform/drivers/keyboard/keyboard_Mod17.c b/platform/drivers/keyboard/keyboard_Mod17.c new file mode 100644 index 00000000..2fb2426c --- /dev/null +++ b/platform/drivers/keyboard/keyboard_Mod17.c @@ -0,0 +1,43 @@ +/*************************************************************************** + * Copyright (C) 2021 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 +#include +#include +#include +#include +#include + +void kbd_init() +{ + +} + +void kbd_terminate() +{ + +} + +keyboard_t kbd_getKeys() +{ + keyboard_t keys = 0; + return keys; +}