Skip to content

Commit

Permalink
added sbus server
Browse files Browse the repository at this point in the history
  • Loading branch information
tk20dk committed Nov 28, 2020
1 parent 1b00f8e commit 963a312
Show file tree
Hide file tree
Showing 25 changed files with 2,898 additions and 801 deletions.
14 changes: 7 additions & 7 deletions stm32/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.836001854" name="Release" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release">
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.836001854." name="/" resourcePath="">
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.625454095" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release">
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.type.1638393831" name="Internal Toolchain Type" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.type" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.version.1113603466" name="Internal Toolchain Version" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.version" value="7-2018-q2-update" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1973634667" name="Mcu" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" value="STM32F072C8Tx" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.368406392" name="CpuId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.2058479474" name="CpuCoreId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.683745981" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" value="genericBoard" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1857100080" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.3 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F072C8Tx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../USB_DEVICE/Target | ../Drivers/STM32F0xx_HAL_Driver/Inc | ../Drivers/CMSIS/Include | ../Core/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc | ../USB_DEVICE/App | ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy | ../Drivers/CMSIS/Device/ST/STM32F0xx/Include | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc || || || USE_HAL_DRIVER | STM32F072xB || || Drivers | Core/Startup | Middlewares | Core | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F072C8TX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || " valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.type.1638393831" name="Internal Toolchain Type" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.type" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.version.1113603466" name="Internal Toolchain Version" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.version" useByScannerDiscovery="false" value="7-2018-q2-update" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1973634667" name="Mcu" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32F072C8Tx" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.368406392" name="CpuId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.2058479474" name="CpuCoreId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.683745981" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1857100080" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.3 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F072C8Tx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../USB_DEVICE/Target | ../Drivers/STM32F0xx_HAL_Driver/Inc | ../Drivers/CMSIS/Include | ../Core/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc | ../USB_DEVICE/App | ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy | ../Drivers/CMSIS/Device/ST/STM32F0xx/Include | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc || || || USE_HAL_DRIVER | STM32F072xB || || Drivers | Core/Startup | Middlewares | Core | USB_DEVICE || || || ${workspace_loc:/${ProjName}/STM32F072C8TX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || " valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1335001027" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/daisy}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1016059895" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.472921993" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
Expand Down
40 changes: 20 additions & 20 deletions stm32/.mxproject
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ CDefines=USE_HAL_DRIVER;STM32F072xB;USE_HAL_DRIVER;USE_HAL_DRIVER;
[PreviousGenFiles]
AdvancedFolderStructure=true
HeaderFileListSize=7
HeaderFiles#0=/home/tk/projects/daisy/stm32/USB_DEVICE/App/usb_device.h
HeaderFiles#1=/home/tk/projects/daisy/stm32/USB_DEVICE/Target/usbd_conf.h
HeaderFiles#2=/home/tk/projects/daisy/stm32/USB_DEVICE/App/usbd_desc.h
HeaderFiles#3=/home/tk/projects/daisy/stm32/USB_DEVICE/App/usbd_cdc_if.h
HeaderFiles#4=/home/tk/projects/daisy/stm32/Core/Inc/stm32f0xx_it.h
HeaderFiles#5=/home/tk/projects/daisy/stm32/Core/Inc/stm32f0xx_hal_conf.h
HeaderFiles#6=/home/tk/projects/daisy/stm32/Core/Inc/main.h
HeaderFiles#0=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/App/usb_device.h
HeaderFiles#1=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/Target/usbd_conf.h
HeaderFiles#2=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/App/usbd_desc.h
HeaderFiles#3=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/App/usbd_cdc_if.h
HeaderFiles#4=/home/tk/tk20dk/daisy/stm32/Core/Inc/stm32f0xx_it.h
HeaderFiles#5=/home/tk/tk20dk/daisy/stm32/Core/Inc/stm32f0xx_hal_conf.h
HeaderFiles#6=/home/tk/tk20dk/daisy/stm32/Core/Inc/main.h
HeaderFolderListSize=3
HeaderPath#0=/home/tk/projects/daisy/stm32/USB_DEVICE/App
HeaderPath#1=/home/tk/projects/daisy/stm32/USB_DEVICE/Target
HeaderPath#2=/home/tk/projects/daisy/stm32/Core/Inc
HeaderPath#0=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/App
HeaderPath#1=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/Target
HeaderPath#2=/home/tk/tk20dk/daisy/stm32/Core/Inc
HeaderFiles=;
SourceFileListSize=7
SourceFiles#0=/home/tk/projects/daisy/stm32/USB_DEVICE/App/usb_device.c
SourceFiles#1=/home/tk/projects/daisy/stm32/USB_DEVICE/Target/usbd_conf.c
SourceFiles#2=/home/tk/projects/daisy/stm32/USB_DEVICE/App/usbd_desc.c
SourceFiles#3=/home/tk/projects/daisy/stm32/USB_DEVICE/App/usbd_cdc_if.c
SourceFiles#4=/home/tk/projects/daisy/stm32/Core/Src/stm32f0xx_it.c
SourceFiles#5=/home/tk/projects/daisy/stm32/Core/Src/stm32f0xx_hal_msp.c
SourceFiles#6=/home/tk/projects/daisy/stm32/Core/Src/main.c
SourceFiles#0=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/App/usb_device.c
SourceFiles#1=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/Target/usbd_conf.c
SourceFiles#2=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/App/usbd_desc.c
SourceFiles#3=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/App/usbd_cdc_if.c
SourceFiles#4=/home/tk/tk20dk/daisy/stm32/Core/Src/stm32f0xx_it.c
SourceFiles#5=/home/tk/tk20dk/daisy/stm32/Core/Src/stm32f0xx_hal_msp.c
SourceFiles#6=/home/tk/tk20dk/daisy/stm32/Core/Src/main.c
SourceFolderListSize=3
SourcePath#0=/home/tk/projects/daisy/stm32/USB_DEVICE/App
SourcePath#1=/home/tk/projects/daisy/stm32/USB_DEVICE/Target
SourcePath#2=/home/tk/projects/daisy/stm32/Core/Src
SourcePath#0=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/App
SourcePath#1=/home/tk/tk20dk/daisy/stm32/USB_DEVICE/Target
SourcePath#2=/home/tk/tk20dk/daisy/stm32/Core/Src
SourceFiles=;

4 changes: 2 additions & 2 deletions stm32/.settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-172279463383009595" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="452590303886195070" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand All @@ -18,7 +18,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-172279463383009595" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="475361696283127486" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
4 changes: 4 additions & 0 deletions stm32/.settings/stm32cubeide.project.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
2F62501ED4689FB349E356AB974DBE57=2530B237FA8FBA1B75B9A5B61F98EB78
8DF89ED150041C4CBC7CB9A9CAA90856=2530B237FA8FBA1B75B9A5B61F98EB78
DC22A860405A8BF2F2C095E5B6529F12=254AFEB1658AF80E9F167B4A9A0D9624
eclipse.preferences.version=1
86 changes: 84 additions & 2 deletions stm32/Core/Src/daisy.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "daisy.h"


#define GPS_CLIENT_no
#define GPS_SERVER_no
#define SBUS_SERVER

extern SPI_HandleTypeDef hspi1;
extern UART_HandleTypeDef huart1;
Expand All @@ -11,6 +13,37 @@ TGps Gps( huart1 );
TDaisy Daisy;
TSystem System;

struct TSbusFrame
{
static uint8_t const SbusSOF = 0x0f;
static uint8_t const SbusEOF = 0x00;
static uint8_t const FlagNull = 0x00;
static uint8_t const FlagCh17 = 0x01;
static uint8_t const FlagCh18 = 0x02;
static uint8_t const FlagLostFrame = 0x04;
static uint8_t const FlagFailSafe = 0x08;

uint8_t Sof;
uint32_t Ch1:11;
uint32_t Ch2:11;
uint32_t Ch3:11;
uint32_t Ch4:11;
uint32_t Ch5:11;
uint32_t Ch6:11;
uint32_t Ch7:11;
uint32_t Ch8:11;
uint32_t Ch9:11;
uint32_t Ch10:11;
uint32_t Ch11:11;
uint32_t Ch12:11;
uint32_t Ch13:11;
uint32_t Ch14:11;
uint32_t Ch15:11;
uint32_t Ch16:11;
uint8_t Flag;
uint8_t Eof;
} __attribute__((__packed__));

void TDaisy::Setup()
{
// NvDataInit();
Expand Down Expand Up @@ -55,6 +88,41 @@ void TDaisy::Loop()
Radio868.Interrupt();
}

#ifdef SBUS_SERVER
auto const Tick = HAL_GetTick();
static uint32_t LastTick;
if(( Tick > LastTick ) && ( Tick % 1000 ) == 0 )
{
LastTick = Tick;

TSbusFrame SbusFrame;
SbusFrame.Sof = TSbusFrame::SbusSOF;
SbusFrame.Ch1 = 0;
SbusFrame.Ch2 = 0;
SbusFrame.Ch3 = 0;
SbusFrame.Ch4 = 0;
SbusFrame.Ch5 = 0;
SbusFrame.Ch6 = 0;
SbusFrame.Ch7 = 0;
SbusFrame.Ch8 = 0;
SbusFrame.Ch9 = 0;
SbusFrame.Ch10 = 0;
SbusFrame.Ch11 = 0;
SbusFrame.Ch12 = 0;
SbusFrame.Ch13 = 0;
SbusFrame.Ch14 = 0;
SbusFrame.Ch15 = 0;
SbusFrame.Ch16 = 0;
SbusFrame.Flag = TSbusFrame::FlagNull;
SbusFrame.Eof = TSbusFrame::SbusEOF;

if(( Tick % 2000 ) == 0 )
Radio433.Transmit( &SbusFrame, sizeof( SbusFrame ));
else
Radio868.Transmit( &SbusFrame, sizeof( SbusFrame ));
}
#endif

#ifdef GPS_SERVER
auto const Tick = HAL_GetTick();
static uint32_t LastTick;
Expand Down Expand Up @@ -93,6 +161,7 @@ void TDaisy::Radio433Event( TRadioEvent const Event )
union
{
uint8_t Buffer[ 256 ];
TSbusFrame SbusFrame;
TGps::TDataRMC DataRMC;
};

Expand All @@ -112,14 +181,20 @@ void TDaisy::Radio433Event( TRadioEvent const Event )
DataRMC.LatDeg, DataRMC.LatMin, DataRMC.LatSec, DataRMC.LatSouth ? 'S' : 'N',
DataRMC.LonDeg, DataRMC.LonMin, DataRMC.LonSec, DataRMC.LonWest ? 'W' : 'E' );
}
else if( Length == sizeof( TSbusFrame ))
{
Hmi1Blue( 100 );
UsbPrintf( "433 Rssi:%4d Snr:%3d.%u Len:%u Sbus frame\n", Rssi, Snr / 10, abs(Snr) % 10, Length );
}
else
{
UsbPrintf( "433 Rssi:%4d Snr:%3d.%u Len:%u Length error\n", Rssi, Snr / 10, abs(Snr) % 10, Length );
}

#ifdef GPS_SERVER
Radio433.Receive();
#else
#endif
#ifdef GPS_CLIENT
Radio433.Transmit( Buffer, Length);
#endif
}
Expand Down Expand Up @@ -159,6 +234,7 @@ void TDaisy::Radio868Event( TRadioEvent const Event )
union
{
uint8_t Buffer[ 256 ];
TSbusFrame SbusFrame;
TGps::TDataRMC DataRMC;
};

Expand All @@ -178,14 +254,20 @@ void TDaisy::Radio868Event( TRadioEvent const Event )
DataRMC.LatDeg, DataRMC.LatMin, DataRMC.LatSec, DataRMC.LatSouth ? 'S' : 'N',
DataRMC.LonDeg, DataRMC.LonMin, DataRMC.LonSec, DataRMC.LonWest ? 'W' : 'E' );
}
else if( Length == sizeof( TSbusFrame ))
{
Hmi1Blue( 100 );
UsbPrintf( "868 Rssi:%4d Snr:%3d.%u Len:%u Sbus frame\n", Rssi, Snr / 10, abs(Snr) % 10, Length );
}
else
{
UsbPrintf( "868 Rssi:%4d Snr:%3d.%u Len:%u Length error\n", Rssi, Snr / 10, abs(Snr) % 10, Length );
}

#ifdef GPS_SERVER
Radio868.Receive();
#else
#endif
#ifdef GPS_CLIENT
Radio868.Transmit( Buffer, Length);
#endif
}
Expand Down
22 changes: 16 additions & 6 deletions stm32/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@
#define STM32F0
#endif /* STM32F0 */

/* Uncomment the line below according to the target STM32 device used in your
application
/** Uncomment the line below according to the target STM32 device used in your application.
* stm32f0xxxx.h file contains:
* - All the peripheral register's definitions, bits definitions and memory mapping for STM32F0xxxx devices
* - IRQ channel definition
* - Peripheral memory mapping and physical registers address definition
* - Peripheral pointer declaration and driver header file inclusion
* - Product miscellaneous configuration: assert macros…
* Note: These CMSIS drivers (stm32f0xxxx.h) are always supporting features of the sub-family’s superset.
*/

#if !defined (STM32F030x6) && !defined (STM32F030x8) && \
Expand All @@ -68,7 +74,7 @@
/* #define STM32F031x6 */ /*!< STM32F031x4, STM32F031x6 Devices (STM32F031xx microcontrollers where the Flash memory ranges between 16 and 32 Kbytes) */
/* #define STM32F038xx */ /*!< STM32F038xx Devices (STM32F038xx microcontrollers where the Flash memory is 32 Kbytes) */
/* #define STM32F042x6 */ /*!< STM32F042x4, STM32F042x6 Devices (STM32F042xx microcontrollers where the Flash memory ranges between 16 and 32 Kbytes) */
/* #define STM32F048x6 */ /*!< STM32F048xx Devices (STM32F042xx microcontrollers where the Flash memory is 32 Kbytes) */
/* #define STM32F048xx */ /*!< STM32F048xx Devices (STM32F048xx microcontrollers where the Flash memory is 32 Kbytes) */
/* #define STM32F051x8 */ /*!< STM32F051x4, STM32F051x6, STM32F051x8 Devices (STM32F051xx microcontrollers where the Flash memory ranges between 16 and 64 Kbytes) */
/* #define STM32F058xx */ /*!< STM32F058xx Devices (STM32F058xx microcontrollers where the Flash memory is 64 Kbytes) */
/* #define STM32F070x6 */ /*!< STM32F070x6 Devices (STM32F070x6 microcontrollers where the Flash memory ranges between 16 and 32 Kbytes) */
Expand All @@ -80,7 +86,11 @@
/* #define STM32F091xC */ /*!< STM32F091xB, STM32F091xC Devices (STM32F091xx microcontrollers where the Flash memory ranges between 128 and 256 Kbytes) */
/* #define STM32F098xx */ /*!< STM32F098xx Devices (STM32F098xx microcontrollers where the Flash memory is 256 Kbytes) */
#endif

/* Legacy aliases */
#if defined (STM32F048x6)
#define STM32F048xx
#endif /* STM32F048x6 */

/* Tip: To avoid modifying this file each time you need to switch between these
devices, you can define the device in your toolchain compiler preprocessor.
*/
Expand All @@ -94,11 +104,11 @@
#endif /* USE_HAL_DRIVER */

/**
* @brief CMSIS Device version number V2.3.4
* @brief CMSIS Device version number V2.3.5
*/
#define __STM32F0_DEVICE_VERSION_MAIN (0x02) /*!< [31:24] main version */
#define __STM32F0_DEVICE_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
#define __STM32F0_DEVICE_VERSION_SUB2 (0x04) /*!< [15:8] sub2 version */
#define __STM32F0_DEVICE_VERSION_SUB2 (0x05) /*!< [15:8] sub2 version */
#define __STM32F0_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
#define __STM32F0_DEVICE_VERSION ((__STM32F0_DEVICE_VERSION_MAIN << 24)\
|(__STM32F0_DEVICE_VERSION_SUB1 << 16)\
Expand Down
Loading

0 comments on commit 963a312

Please sign in to comment.