Merge pull request #93 from RobertGawron/feature/basic_sw_components_implementation

code formated using uncrustify
pull/94/head
Robert 2019-07-27 16:04:08 +02:00 zatwierdzone przez GitHub
commit bf8c11100f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
13 zmienionych plików z 515 dodań i 517 usunięć

Wyświetl plik

@ -9,7 +9,7 @@
#define INC_COMMONDATATYPES_H_
#ifdef bool
#error bool is already defined
#error bool is already defined
#endif
#include "stm8s.h"

Wyświetl plik

@ -13,7 +13,7 @@
#define VoltageSensorActualValue_MeasurementData_t int
typedef struct MCP3425A0TConfig_t {
int pinId;
int pinId;
} MCP3425A0TConfig_t;

Wyświetl plik

@ -1,29 +1,29 @@
/**
******************************************************************************
* @file stm8s_conf.h
* @author MCD Application Team
* @version V2.2.0
* @date 30-September-2014
* @brief This file is used to configure the Library.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
******************************************************************************
* @file stm8s_conf.h
* @author MCD Application Team
* @version V2.2.0
* @date 30-September-2014
* @brief This file is used to configure the Library.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM8S_CONF_H
@ -33,11 +33,11 @@
#include "stm8s.h"
/* Uncomment the line below to enable peripheral header file inclusion */
#if defined(STM8S105) || defined(STM8S005) || defined(STM8S103) || defined(STM8S003) ||\
#if defined(STM8S105) || defined(STM8S005) || defined(STM8S103) || defined(STM8S003) || \
defined(STM8S903) || defined (STM8AF626x)
#include "stm8s_adc1.h"
#include "stm8s_adc1.h"
#endif /* (STM8S105) ||(STM8S103) || (STM8S903) || STM8AF626x*/
#if defined(STM8S208) || defined(STM8S207) || defined(STM8S007) || defined (STM8AF52Ax) ||\
#if defined(STM8S208) || defined(STM8S207) || defined(STM8S007) || defined (STM8AF52Ax) || \
defined (STM8AF62Ax)
#include "stm8s_adc2.h"
#endif /* (STM8S208) || (STM8S207) || (STM8AF62Ax) || (STM8AF52Ax) */
@ -59,10 +59,10 @@
#ifndef STM8S903
#include "stm8s_tim2.h"
#endif /* STM8S903 */
#if defined(STM8S208) || defined(STM8S207) || defined(STM8S007) ||defined(STM8S105) ||\
#if defined(STM8S208) || defined(STM8S207) || defined(STM8S007) ||defined(STM8S105) || \
defined(STM8S005) || defined (STM8AF52Ax) || defined (STM8AF62Ax) || defined (STM8AF626x)
#include "stm8s_tim3.h"
#endif /* (STM8S208) ||defined(STM8S207) || defined(STM8S007) ||defined(STM8S105) */
#endif /* (STM8S208) ||defined(STM8S207) || defined(STM8S007) ||defined(STM8S105) */
#ifndef STM8S903
#include "stm8s_tim4.h"
#endif /* STM8S903 */
@ -70,36 +70,36 @@
#include "stm8s_tim5.h"
#include "stm8s_tim6.h"
#endif /* STM8S903 */
#if defined(STM8S208) ||defined(STM8S207) || defined(STM8S007) ||defined(STM8S103) ||\
#if defined(STM8S208) ||defined(STM8S207) || defined(STM8S007) ||defined(STM8S103) || \
defined(STM8S003) || defined(STM8S903) || defined (STM8AF52Ax) || defined (STM8AF62Ax)
#include "stm8s_uart1.h"
#endif /* STM8S208 || STM8S207 || STM8S103 ||STM8S903 || STM8AF52Ax || STM8AF62Ax */
#if defined(STM8S105) || defined(STM8S005) || defined (STM8AF626x)
#include "stm8s_uart2.h"
#endif /* STM8S105 || STM8AF626x */
#if defined(STM8S208) ||defined(STM8S207) || defined(STM8S007) || defined (STM8AF52Ax) ||\
#if defined(STM8S208) ||defined(STM8S207) || defined(STM8S007) || defined (STM8AF52Ax) || \
defined (STM8AF62Ax)
#include "stm8s_uart3.h"
#endif /* STM8S208 || STM8S207 || STM8AF52Ax || STM8AF62Ax */
#endif /* STM8S208 || STM8S207 || STM8AF52Ax || STM8AF62Ax */
#include "stm8s_wwdg.h"
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Uncomment the line below to expanse the "assert_param" macro in the
Standard Peripheral Library drivers code */
#define USE_FULL_ASSERT (1)
#define USE_FULL_ASSERT (1)
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval : None
*/
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval : None
*/
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t* file, uint32_t line);

Wyświetl plik

@ -1,29 +1,29 @@
/**
******************************************************************************
* @file stm8s_it.h
* @author MCD Application Team
* @version V2.2.0
* @date 30-September-2014
* @brief This file contains the headers of the interrupt handlers
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
******************************************************************************
* @file stm8s_it.h
* @author MCD Application Team
* @version V2.2.0
* @date 30-September-2014
* @brief This file contains the headers of the interrupt handlers
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM8S_IT_H
@ -37,167 +37,167 @@
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
#ifdef _COSMIC_
void _stext(void); /* RESET startup routine */
INTERRUPT void NonHandledInterrupt(void);
void _stext(void); /* RESET startup routine */
INTERRUPT void NonHandledInterrupt(void);
#endif /* _COSMIC_ */
#if defined(_IAR_)
INTERRUPT void TRAP_IRQHandler(void); /* TRAP */
INTERRUPT void TLI_IRQHandler(void); /* TLI */
INTERRUPT void AWU_IRQHandler(void); /* AWU */
INTERRUPT void CLK_IRQHandler(void); /* CLOCK */
INTERRUPT void EXTI_PORTA_IRQHandler(void); /* EXTI PORTA */
INTERRUPT void EXTI_PORTB_IRQHandler(void); /* EXTI PORTB */
INTERRUPT void EXTI_PORTC_IRQHandler(void); /* EXTI PORTC */
INTERRUPT void EXTI_PORTD_IRQHandler(void); /* EXTI PORTD */
INTERRUPT void EXTI_PORTE_IRQHandler(void); /* EXTI PORTE */
INTERRUPT void TRAP_IRQHandler(void); /* TRAP */
INTERRUPT void TLI_IRQHandler(void); /* TLI */
INTERRUPT void AWU_IRQHandler(void); /* AWU */
INTERRUPT void CLK_IRQHandler(void); /* CLOCK */
INTERRUPT void EXTI_PORTA_IRQHandler(void); /* EXTI PORTA */
INTERRUPT void EXTI_PORTB_IRQHandler(void); /* EXTI PORTB */
INTERRUPT void EXTI_PORTC_IRQHandler(void); /* EXTI PORTC */
INTERRUPT void EXTI_PORTD_IRQHandler(void); /* EXTI PORTD */
INTERRUPT void EXTI_PORTE_IRQHandler(void); /* EXTI PORTE */
#elif defined(_SDCC_)
INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler);
INTERRUPT_HANDLER(TLI_IRQHandler, 0);
INTERRUPT_HANDLER(AWU_IRQHandler, 1);
INTERRUPT_HANDLER(CLK_IRQHandler, 2);
INTERRUPT_HANDLER(EXTI_PORTA_IRQHandler, 3);
INTERRUPT_HANDLER(EXTI_PORTB_IRQHandler, 4);
INTERRUPT_HANDLER(EXTI_PORTC_IRQHandler, 5);
INTERRUPT_HANDLER(EXTI_PORTD_IRQHandler, 6);
INTERRUPT_HANDLER(EXTI_PORTE_IRQHandler, 7);
INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler);
INTERRUPT_HANDLER(TLI_IRQHandler, 0);
INTERRUPT_HANDLER(AWU_IRQHandler, 1);
INTERRUPT_HANDLER(CLK_IRQHandler, 2);
INTERRUPT_HANDLER(EXTI_PORTA_IRQHandler, 3);
INTERRUPT_HANDLER(EXTI_PORTB_IRQHandler, 4);
INTERRUPT_HANDLER(EXTI_PORTC_IRQHandler, 5);
INTERRUPT_HANDLER(EXTI_PORTD_IRQHandler, 6);
INTERRUPT_HANDLER(EXTI_PORTE_IRQHandler, 7);
#endif
#if defined(STM8S903) || defined(STM8AF622x)
#if defined(_IAR_)
INTERRUPT void EXTI_PORTF_IRQHandler(void); /* EXTI PORTF */
INTERRUPT void EXTI_PORTF_IRQHandler(void); /* EXTI PORTF */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(EXTI_PORTF_IRQHandler, 8);
INTERRUPT_HANDLER(EXTI_PORTF_IRQHandler, 8);
#endif
#endif /* (STM8S903) || (STM8AF622x) */
#if defined (STM8S208) || defined (STM8AF52Ax)
#if defined(_IAR_)
INTERRUPT void CAN_RX_IRQHandler(void); /* CAN RX */
INTERRUPT void CAN_TX_IRQHandler(void); /* CAN TX/ER/SC */
INTERRUPT void CAN_RX_IRQHandler(void); /* CAN RX */
INTERRUPT void CAN_TX_IRQHandler(void); /* CAN TX/ER/SC */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(CAN_RX_IRQHandler, 8);
INTERRUPT_HANDLER(CAN_TX_IRQHandler, 9);
INTERRUPT_HANDLER(CAN_RX_IRQHandler, 8);
INTERRUPT_HANDLER(CAN_TX_IRQHandler, 9);
#endif
#endif /* (STM8S208) || (STM8AF52Ax) */
#if defined(_IAR_)
INTERRUPT void SPI_IRQHandler(void); /* SPI */
INTERRUPT void TIM1_CAP_COM_IRQHandler(void); /* TIM1 CAP/COM */
INTERRUPT void TIM1_UPD_OVF_TRG_BRK_IRQHandler(void); /* TIM1 UPD/OVF/TRG/BRK */
INTERRUPT void SPI_IRQHandler(void); /* SPI */
INTERRUPT void TIM1_CAP_COM_IRQHandler(void); /* TIM1 CAP/COM */
INTERRUPT void TIM1_UPD_OVF_TRG_BRK_IRQHandler(void); /* TIM1 UPD/OVF/TRG/BRK */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(SPI_IRQHandler, 10);
INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_BRK_IRQHandler, 11);
INTERRUPT_HANDLER(TIM1_CAP_COM_IRQHandler, 12);
INTERRUPT_HANDLER(SPI_IRQHandler, 10);
INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_BRK_IRQHandler, 11);
INTERRUPT_HANDLER(TIM1_CAP_COM_IRQHandler, 12);
#endif
#if defined(STM8S903) || defined(STM8AF622x)
#if defined(_IAR_)
INTERRUPT void TIM5_UPD_OVF_BRK_TRG_IRQHandler(void); /* TIM5 UPD/OVF/BRK/TRG */
INTERRUPT void TIM5_CAP_COM_IRQHandler(void); /* TIM5 CAP/COM */
INTERRUPT void TIM5_UPD_OVF_BRK_TRG_IRQHandler(void); /* TIM5 UPD/OVF/BRK/TRG */
INTERRUPT void TIM5_CAP_COM_IRQHandler(void); /* TIM5 CAP/COM */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(TIM5_UPD_OVF_BRK_TRG_IRQHandler, 13);
INTERRUPT_HANDLER(TIM5_CAP_COM_IRQHandler, 14);
INTERRUPT_HANDLER(TIM5_UPD_OVF_BRK_TRG_IRQHandler, 13);
INTERRUPT_HANDLER(TIM5_CAP_COM_IRQHandler, 14);
#endif
#else /* (STM8S208) || (STM8S207) || (STM8S105) || (STM8S103) || (STM8AF52Ax) || (STM8AF62Ax) || (STM8A626x) */
#if defined(_IAR_)
INTERRUPT void TIM2_UPD_OVF_BRK_IRQHandler(void); /* TIM2 UPD/OVF/BRK */
INTERRUPT void TIM2_CAP_COM_IRQHandler(void); /* TIM2 CAP/COM */
INTERRUPT void TIM2_UPD_OVF_BRK_IRQHandler(void); /* TIM2 UPD/OVF/BRK */
INTERRUPT void TIM2_CAP_COM_IRQHandler(void); /* TIM2 CAP/COM */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(TIM2_UPD_OVF_BRK_IRQHandler, 13);
INTERRUPT_HANDLER(TIM2_CAP_COM_IRQHandler, 14);
INTERRUPT_HANDLER(TIM2_UPD_OVF_BRK_IRQHandler, 13);
INTERRUPT_HANDLER(TIM2_CAP_COM_IRQHandler, 14);
#endif
#endif /* (STM8S903) || (STM8AF622x) */
#if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S105) || \
defined(STM8S005) || defined (STM8AF52Ax) || defined (STM8AF62Ax) || defined (STM8AF626x)
#if defined(_IAR_)
INTERRUPT void TIM3_UPD_OVF_BRK_IRQHandler(void); /* TIM3 UPD/OVF/BRK */
INTERRUPT void TIM3_CAP_COM_IRQHandler(void); /* TIM3 CAP/COM */
INTERRUPT void TIM3_UPD_OVF_BRK_IRQHandler(void); /* TIM3 UPD/OVF/BRK */
INTERRUPT void TIM3_CAP_COM_IRQHandler(void); /* TIM3 CAP/COM */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(TIM3_UPD_OVF_BRK_IRQHandler, 15);
INTERRUPT_HANDLER(TIM3_CAP_COM_IRQHandler, 16);
INTERRUPT_HANDLER(TIM3_UPD_OVF_BRK_IRQHandler, 15);
INTERRUPT_HANDLER(TIM3_CAP_COM_IRQHandler, 16);
#endif
#endif /* (STM8S208) || (STM8S207) || (STM8S105) || (STM8AF52Ax) || (STM8AF62Ax) || (STM8A626x) */
#if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S103) || \
defined(STM8S003) || defined (STM8AF52Ax) || defined (STM8AF62Ax) || defined (STM8S903)
#if defined(_IAR_)
INTERRUPT void UART1_TX_IRQHandler(void); /* UART1 TX */
INTERRUPT void UART1_RX_IRQHandler(void); /* UART1 RX */
INTERRUPT void UART1_TX_IRQHandler(void); /* UART1 TX */
INTERRUPT void UART1_RX_IRQHandler(void); /* UART1 RX */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(UART1_TX_IRQHandler, 17);
INTERRUPT_HANDLER(UART1_RX_IRQHandler, 18);
INTERRUPT_HANDLER(UART1_TX_IRQHandler, 17);
INTERRUPT_HANDLER(UART1_RX_IRQHandler, 18);
#endif
#endif /* (STM8S208) || (STM8S207) || (STM8S903) || (STM8S103) || (STM8AF52Ax) || (STM8AF62Ax) */
#if defined (STM8AF622x)
#if defined(_IAR_)
INTERRUPT void UART4_TX_IRQHandler(void); /* UART4 TX */
INTERRUPT void UART4_RX_IRQHandler(void); /* UART4 RX */
INTERRUPT void UART4_TX_IRQHandler(void); /* UART4 TX */
INTERRUPT void UART4_RX_IRQHandler(void); /* UART4 RX */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(UART4_TX_IRQHandler, 17);
INTERRUPT_HANDLER(UART4_RX_IRQHandler, 18);
INTERRUPT_HANDLER(UART4_TX_IRQHandler, 17);
INTERRUPT_HANDLER(UART4_RX_IRQHandler, 18);
#endif
#endif /* (STM8AF622x) */
#if defined(_IAR_)
INTERRUPT void I2C_IRQHandler(void); /* I2C */
INTERRUPT void I2C_IRQHandler(void); /* I2C */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(I2C_IRQHandler, 19);
INTERRUPT_HANDLER(I2C_IRQHandler, 19);
#endif
#if defined(STM8S105) || defined(STM8S005) || defined (STM8AF626x)
#if defined(_IAR_)
INTERRUPT void UART2_RX_IRQHandler(void); /* UART2 RX */
INTERRUPT void UART2_TX_IRQHandler(void); /* UART2 TX */
INTERRUPT void UART2_RX_IRQHandler(void); /* UART2 RX */
INTERRUPT void UART2_TX_IRQHandler(void); /* UART2 TX */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(UART2_TX_IRQHandler, 20);
INTERRUPT_HANDLER(UART2_RX_IRQHandler, 21);
INTERRUPT_HANDLER(UART2_TX_IRQHandler, 20);
INTERRUPT_HANDLER(UART2_RX_IRQHandler, 21);
#endif
#endif /* (STM8S105) || (STM8AF626x) */
#if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax)
#if defined(_IAR_)
INTERRUPT void UART3_RX_IRQHandler(void); /* UART3 RX */
INTERRUPT void UART3_TX_IRQHandler(void); /* UART3 TX */
INTERRUPT void UART3_RX_IRQHandler(void); /* UART3 RX */
INTERRUPT void UART3_TX_IRQHandler(void); /* UART3 TX */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(UART3_TX_IRQHandler, 20);
INTERRUPT_HANDLER(UART3_RX_IRQHandler, 21);
INTERRUPT_HANDLER(UART3_TX_IRQHandler, 20);
INTERRUPT_HANDLER(UART3_RX_IRQHandler, 21);
#endif
#endif /* (STM8S207) || (STM8S208) || (STM8AF62Ax) || (STM8AF52Ax) */
#if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax)
#if defined(_IAR_)
INTERRUPT void ADC2_IRQHandler(void); /* ADC2 */
INTERRUPT void ADC2_IRQHandler(void); /* ADC2 */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(ADC2_IRQHandler, 22);
INTERRUPT_HANDLER(ADC2_IRQHandler, 22);
#endif
#else /* (STM8S105) || (STM8S103) || (STM8S903) || (STM8AF622x) */
#if defined(_IAR_)
INTERRUPT void ADC1_IRQHandler(void); /* ADC1 */
INTERRUPT void ADC1_IRQHandler(void); /* ADC1 */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(ADC1_IRQHandler, 22);
INTERRUPT_HANDLER(ADC1_IRQHandler, 22);
#endif
#endif /* (STM8S207) || (STM8S208) || (STM8AF62Ax) || (STM8AF52Ax) */
#if defined(STM8S903) || defined(STM8AF622x)
#if defined(_IAR_)
INTERRUPT void TIM6_UPD_OVF_TRG_IRQHandler(void); /* TIM6 UPD/OVF/TRG */
INTERRUPT void TIM6_UPD_OVF_TRG_IRQHandler(void); /* TIM6 UPD/OVF/TRG */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(TIM6_UPD_OVF_TRG_IRQHandler, 23);
INTERRUPT_HANDLER(TIM6_UPD_OVF_TRG_IRQHandler, 23);
#endif
#else /* (STM8S208) || (STM8S207) || (STM8S105) || (STM8S103) || (STM8AF62Ax) || (STM8AF52Ax) || (STM8AF626x) */
#if defined(_IAR_)
INTERRUPT void TIM4_UPD_OVF_IRQHandler(void); /* TIM4 UPD/OVF */
INTERRUPT void TIM4_UPD_OVF_IRQHandler(void); /* TIM4 UPD/OVF */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(TIM4_UPD_OVF_IRQHandler, 23);
INTERRUPT_HANDLER(TIM4_UPD_OVF_IRQHandler, 23);
#endif
#endif /* (STM8S903) || (STM8AF622x) */
#if defined(_IAR_)
INTERRUPT void EEPROM_EEC_IRQHandler(void); /* EEPROM ECC CORRECTION */
INTERRUPT void EEPROM_EEC_IRQHandler(void); /* EEPROM ECC CORRECTION */
#elif defined(_SDCC_)
INTERRUPT_HANDLER(EEPROM_EEC_IRQHandler, 24);
INTERRUPT_HANDLER(EEPROM_EEC_IRQHandler, 24);
#endif
#endif /* __STM8S_IT_H */

Wyświetl plik

@ -24,10 +24,10 @@ void ApplicationBuilder_Init()
PulseCounter_Init();
UserInterface_Init();
VoltageSensorActualValue_Init();
enableInterrupts();
// UserInterface_ShowMessage(USER_INTERFAE_STATE_OK_MSG);
// UserInterface_ShowMessage(USER_INTERFAE_STATE_OK_MSG);
}
void ApplicationBuilder_Run()

Wyświetl plik

@ -23,9 +23,9 @@ void ClockConfigurator_Init()
CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);
CLK_ClockSwitchConfig(CLK_SWITCHMODE_AUTO,
CLK_SOURCE_HSI,
DISABLE,
CLK_CURRENTCLOCKSTATE_ENABLE);
CLK_SOURCE_HSI,
DISABLE,
CLK_CURRENTCLOCKSTATE_ENABLE);
CLK_PeripheralClockConfig(CLK_PERIPHERAL_I2C, ENABLE);
CLK_PeripheralClockConfig(CLK_PERIPHERAL_AWU, ENABLE);

12
software/Firmware/Src/Logger.c 100755 → 100644
Wyświetl plik

@ -40,7 +40,7 @@ void Logger_Init()
void Logger_Tick()
{
// printf ("ok ");
// printf ("ok ");
}
@ -68,11 +68,11 @@ void UART1_setup(void)
UART1_DeInit();
UART1_Init(9600,
UART1_WORDLENGTH_8D,
UART1_STOPBITS_1,
UART1_PARITY_NO,
UART1_SYNCMODE_CLOCK_DISABLE,
UART1_MODE_TXRX_ENABLE);
UART1_WORDLENGTH_8D,
UART1_STOPBITS_1,
UART1_PARITY_NO,
UART1_SYNCMODE_CLOCK_DISABLE,
UART1_MODE_TXRX_ENABLE);
UART1_Cmd(ENABLE);
}

Wyświetl plik

@ -21,15 +21,15 @@ void UserInterface_ShowMessage(UserInterface_Status status)
{
switch(status)
{
case USER_INTERFACE_COLLECTING_DATA_MSG:
{
GPIO_WriteHigh(PORT_GPIO_LED, PIN_GPIO_LED_RED);
break;
}
case USER_INTERFAE_STATE_OK_MSG:
{
GPIO_WriteHigh(PORT_GPIO_LED, PIN_GPIO_LED_GREEN);
break;
}
case USER_INTERFACE_COLLECTING_DATA_MSG:
{
GPIO_WriteHigh(PORT_GPIO_LED, PIN_GPIO_LED_RED);
break;
}
case USER_INTERFAE_STATE_OK_MSG:
{
GPIO_WriteHigh(PORT_GPIO_LED, PIN_GPIO_LED_GREEN);
break;
}
}
}

Wyświetl plik

@ -24,7 +24,7 @@ void VoltageSensorActualValue_Init()
{
#if 0
CLK_DeInit();
CLK_HSECmd(DISABLE);
CLK_LSICmd(DISABLE);
CLK_HSICmd(ENABLE);
@ -35,8 +35,8 @@ void VoltageSensorActualValue_Init()
CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV8);
CLK_SYSCLKConfig(CLK_PRESCALER_CPUDIV2);
CLK_ClockSwitchConfig(CLK_SWITCHMODE_AUTO, CLK_SOURCE_HSI,
DISABLE, CLK_CURRENTCLOCKSTATE_ENABLE);
CLK_ClockSwitchConfig(CLK_SWITCHMODE_AUTO, CLK_SOURCE_HSI,
DISABLE, CLK_CURRENTCLOCKSTATE_ENABLE);
CLK_PeripheralClockConfig(CLK_PERIPHERAL_SPI, DISABLE);
CLK_PeripheralClockConfig(CLK_PERIPHERAL_I2C, ENABLE);
@ -47,10 +47,10 @@ void VoltageSensorActualValue_Init()
CLK_PeripheralClockConfig(CLK_PERIPHERAL_TIMER2, DISABLE);
CLK_PeripheralClockConfig(CLK_PERIPHERAL_TIMER4, DISABLE);
#endif
GPIO_setup();
I2C_setup();
}
@ -59,16 +59,16 @@ bool VoltageSensorActualValue_GeMeasurementData(VoltageSensorActualValue_Measure
I2C_GenerateSTART(ENABLE);
while(!I2C_CheckEvent(I2C_EVENT_MASTER_MODE_SELECT));
I2C_Send7bitAddress(I2C_SLAVE_ADDRESS, I2C_DIRECTION_TX);
I2C_Send7bitAddress(I2C_SLAVE_ADDRESS, I2C_DIRECTION_TX);
//while(!I2C_CheckEvent(I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED));
I2C_SendData(0xf);
//while(!I2C_CheckEvent(I2C_EVENT_MASTER_BYTE_TRANSMITTED));
I2C_GenerateSTOP(ENABLE);
I2C_GenerateSTOP(ENABLE);
while(I2C_GetFlagStatus(I2C_FLAG_BUSBUSY));
// for temporary debug only
UserInterface_ShowMessage(USER_INTERFACE_COLLECTING_DATA_MSG);
@ -81,18 +81,18 @@ void GPIO_setup(void)
{
// TODO magic numbers
GPIO_Init(GPIOB, GPIO_PIN_4, GPIO_MODE_OUT_OD_HIZ_FAST);
GPIO_Init(GPIOB, GPIO_PIN_5, GPIO_MODE_OUT_OD_HIZ_FAST);
}
GPIO_Init(GPIOB, GPIO_PIN_5, GPIO_MODE_OUT_OD_HIZ_FAST);
}
void I2C_setup(void)
{
I2C_DeInit();
I2C_Init(100000,
I2C_OWN_ADDRESS,
I2C_DUTYCYCLE_2,
I2C_ACK_CURR,
I2C_ADDMODE_7BIT,
I2C_Init(100000,
I2C_OWN_ADDRESS,
I2C_DUTYCYCLE_2,
I2C_ACK_CURR,
I2C_ADDMODE_7BIT,
(CLK_GetClockFreq() / 1000000));
I2C_Cmd(ENABLE);
}

6
software/Firmware/Src/main.c 100755 → 100644
Wyświetl plik

@ -10,8 +10,8 @@
int main( void )
{
ApplicationBuilder_Init();
ApplicationBuilder_Run();
ApplicationBuilder_Init();
ApplicationBuilder_Run();
return 0;
return 0;
}

670
software/Firmware/Src/stm8s_it.c 100755 → 100644
Wyświetl plik

@ -1,39 +1,39 @@
/**
******************************************************************************
* @file stm8s_it.c
* @author MCD Application Team
* @version V2.2.0
* @date 30-September-2014
* @brief Main Interrupt Service Routines.
* This file provides template for all peripherals interrupt service
* routine.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
******************************************************************************
* @file stm8s_it.c
* @author MCD Application Team
* @version V2.2.0
* @date 30-September-2014
* @brief Main Interrupt Service Routines.
* This file provides template for all peripherals interrupt service
* routine.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "stm8s_it.h"
#include "ApplicationBuilder.h"
/** @addtogroup Template_Project
* @{
*/
* @{
*/
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
@ -45,471 +45,471 @@
#ifdef _COSMIC_
/**
* @brief Dummy Interrupt routine
* @par Parameters:
* None
* @retval
* None
*/
* @brief Dummy Interrupt routine
* @par Parameters:
* None
* @retval
* None
*/
INTERRUPT_HANDLER(NonHandledInterrupt, 25)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#endif /*_COSMIC_*/
/**
* @brief TRAP Interrupt routine
* @param None
* @retval None
*/
* @brief TRAP Interrupt routine
* @param None
* @retval None
*/
INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief Top Level Interrupt routine.
* @param None
* @retval None
*/
* @brief Top Level Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TLI_IRQHandler, 0)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief Auto Wake Up Interrupt routine.
* @param None
* @retval None
*/
* @brief Auto Wake Up Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(AWU_IRQHandler, 1)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief Clock Controller Interrupt routine.
* @param None
* @retval None
*/
* @brief Clock Controller Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(CLK_IRQHandler, 2)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief External Interrupt PORTA Interrupt routine.
* @param None
* @retval None
*/
* @brief External Interrupt PORTA Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(EXTI_PORTA_IRQHandler, 3)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief External Interrupt PORTB Interrupt routine.
* @param None
* @retval None
*/
* @brief External Interrupt PORTB Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(EXTI_PORTB_IRQHandler, 4)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief External Interrupt PORTC Interrupt routine.
* @param None
* @retval None
*/
* @brief External Interrupt PORTC Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(EXTI_PORTC_IRQHandler, 5)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief External Interrupt PORTD Interrupt routine.
* @param None
* @retval None
*/
* @brief External Interrupt PORTD Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(EXTI_PORTD_IRQHandler, 6)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief External Interrupt PORTE Interrupt routine.
* @param None
* @retval None
*/
* @brief External Interrupt PORTE Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(EXTI_PORTE_IRQHandler, 7)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#if defined (STM8S903) || defined (STM8AF622x)
/**
* @brief External Interrupt PORTF Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(EXTI_PORTF_IRQHandler, 8)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
* @brief External Interrupt PORTF Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(EXTI_PORTF_IRQHandler, 8)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#endif /* (STM8S903) || (STM8AF622x) */
#if defined (STM8S208) || defined (STM8AF52Ax)
/**
* @brief CAN RX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(CAN_RX_IRQHandler, 8)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief CAN TX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(CAN_TX_IRQHandler, 9)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#endif /* (STM8S208) || (STM8AF52Ax) */
/**
* @brief SPI Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(SPI_IRQHandler, 10)
* @brief CAN RX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(CAN_RX_IRQHandler, 8)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief Timer1 Update/Overflow/Trigger/Break Interrupt routine.
* @param None
* @retval None
*/
* @brief CAN TX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(CAN_TX_IRQHandler, 9)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#endif /* (STM8S208) || (STM8AF52Ax) */
/**
* @brief SPI Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(SPI_IRQHandler, 10)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief Timer1 Update/Overflow/Trigger/Break Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_BRK_IRQHandler, 11)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
TIM1_ClearITPendingBit(TIM1_IT_UPDATE);
ApplicationBuilder_Tick();
}
/**
* @brief Timer1 Capture/Compare Interrupt routine.
* @param None
* @retval None
*/
* @brief Timer1 Capture/Compare Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM1_CAP_COM_IRQHandler, 12)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#if defined (STM8S903) || defined (STM8AF622x)
/**
* @brief Timer5 Update/Overflow/Break/Trigger Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM5_UPD_OVF_BRK_TRG_IRQHandler, 13)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
* @brief Timer5 Update/Overflow/Break/Trigger Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM5_UPD_OVF_BRK_TRG_IRQHandler, 13)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief Timer5 Capture/Compare Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM5_CAP_COM_IRQHandler, 14)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
* @brief Timer5 Capture/Compare Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM5_CAP_COM_IRQHandler, 14)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#else /* (STM8S208) || (STM8S207) || (STM8S105) || (STM8S103) || (STM8AF62Ax) || (STM8AF52Ax) || (STM8AF626x) */
/**
* @brief Timer2 Update/Overflow/Break Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM2_UPD_OVF_BRK_IRQHandler, 13)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
* @brief Timer2 Update/Overflow/Break Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM2_UPD_OVF_BRK_IRQHandler, 13)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief Timer2 Capture/Compare Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM2_CAP_COM_IRQHandler, 14)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
* @brief Timer2 Capture/Compare Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM2_CAP_COM_IRQHandler, 14)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#endif /* (STM8S903) || (STM8AF622x) */
#if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S105) || \
defined(STM8S005) || defined (STM8AF62Ax) || defined (STM8AF52Ax) || defined (STM8AF626x)
/**
* @brief Timer3 Update/Overflow/Break Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM3_UPD_OVF_BRK_IRQHandler, 15)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
* @brief Timer3 Update/Overflow/Break Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM3_UPD_OVF_BRK_IRQHandler, 15)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @brief Timer3 Capture/Compare Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM3_CAP_COM_IRQHandler, 16)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
* @brief Timer3 Capture/Compare Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM3_CAP_COM_IRQHandler, 16)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#endif /* (STM8S208) || (STM8S207) || (STM8S105) || (STM8AF62Ax) || (STM8AF52Ax) || (STM8AF626x) */
#if defined (STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S103) || \
defined(STM8S003) || defined (STM8AF62Ax) || defined (STM8AF52Ax) || defined (STM8S903)
/**
* @brief UART1 TX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART1_TX_IRQHandler, 17)
{
* @brief UART1 TX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART1_TX_IRQHandler, 17)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
/**
* @brief UART1 RX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART1_RX_IRQHandler, 18)
{
* @brief UART1 RX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART1_RX_IRQHandler, 18)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
#endif /* (STM8S208) || (STM8S207) || (STM8S103) || (STM8S903) || (STM8AF62Ax) || (STM8AF52Ax) */
#if defined(STM8AF622x)
/**
* @brief UART4 TX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART4_TX_IRQHandler, 17)
{
* @brief UART4 TX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART4_TX_IRQHandler, 17)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
/**
* @brief UART4 RX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART4_RX_IRQHandler, 18)
{
* @brief UART4 RX Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART4_RX_IRQHandler, 18)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
#endif /* (STM8AF622x) */
/**
* @brief I2C Interrupt routine.
* @param None
* @retval None
*/
* @brief I2C Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(I2C_IRQHandler, 19)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#if defined(STM8S105) || defined(STM8S005) || defined (STM8AF626x)
/**
* @brief UART2 TX interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART2_TX_IRQHandler, 20)
{
* @brief UART2 TX interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART2_TX_IRQHandler, 20)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
/**
* @brief UART2 RX interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART2_RX_IRQHandler, 21)
{
* @brief UART2 RX interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART2_RX_IRQHandler, 21)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
#endif /* (STM8S105) || (STM8AF626x) */
#if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax)
/**
* @brief UART3 TX interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART3_TX_IRQHandler, 20)
{
* @brief UART3 TX interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART3_TX_IRQHandler, 20)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
/**
* @brief UART3 RX interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART3_RX_IRQHandler, 21)
{
* @brief UART3 RX interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(UART3_RX_IRQHandler, 21)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
#endif /* (STM8S208) || (STM8S207) || (STM8AF52Ax) || (STM8AF62Ax) */
#if defined(STM8S207) || defined(STM8S007) || defined(STM8S208) || defined (STM8AF52Ax) || defined (STM8AF62Ax)
/**
* @brief ADC2 interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(ADC2_IRQHandler, 22)
{
* @brief ADC2 interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(ADC2_IRQHandler, 22)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
#else /* STM8S105 or STM8S103 or STM8S903 or STM8AF626x or STM8AF622x */
/**
* @brief ADC1 interrupt routine.
* @par Parameters:
* None
* @retval
* None
*/
INTERRUPT_HANDLER(ADC1_IRQHandler, 22)
{
* @brief ADC1 interrupt routine.
* @par Parameters:
* None
* @retval
* None
*/
INTERRUPT_HANDLER(ADC1_IRQHandler, 22)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
*/
}
#endif /* (STM8S208) || (STM8S207) || (STM8AF52Ax) || (STM8AF62Ax) */
#if defined (STM8S903) || defined (STM8AF622x)
/**
* @brief Timer6 Update/Overflow/Trigger Interrupt routine.
* @param None
* @retval None
*/
* @brief Timer6 Update/Overflow/Trigger Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM6_UPD_OVF_TRG_IRQHandler, 23)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#else /* STM8S208 or STM8S207 or STM8S105 or STM8S103 or STM8AF52Ax or STM8AF62Ax or STM8AF626x */
/**
* @brief Timer4 Update/Overflow Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM4_UPD_OVF_IRQHandler, 23)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
* @brief Timer4 Update/Overflow Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(TIM4_UPD_OVF_IRQHandler, 23)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
#endif /* (STM8S903) || (STM8AF622x)*/
/**
* @brief Eeprom EEC Interrupt routine.
* @param None
* @retval None
*/
* @brief Eeprom EEC Interrupt routine.
* @param None
* @retval None
*/
INTERRUPT_HANDLER(EEPROM_EEC_IRQHandler, 24)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
}
/**
* @}
*/
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

Wyświetl plik

@ -131,5 +131,3 @@ formatting:
uncrustify -c uncrustify.cfg --no-backup $(SRCS)/*.c
uncrustify -c uncrustify.cfg --no-backup Inc/*.h

Wyświetl plik

@ -261,7 +261,7 @@ sp_skip_vbrace_tokens = false
align_keep_tabs = false
align_with_tabs = false
align_on_tabstop = false
align_number_left = false
#align_number_left = false
align_keep_extra_space = false
align_func_params = false
align_same_func_call_params = false