STM8S/A Standard Peripherals Drivers: STM8S_StdPeriph_Driver

STM8S/A

STM8S/A Standard Peripherals Drivers
STM8S_StdPeriph_Driver

Modules

 Exported_types
 MAP_FILE_Exported_Types_and_Constants
 GPIO_Registers_Reset_Value
 IWDG_Private_Define
 IWDG_Private_Macros
 IWDG_Exported_Types
 IWDG_Exported_Functions
 RST_Exported_Types
 RST_Private_Macros
 RST_Exported_functions
 SPI_Exported_Types
 SPI_Private_Macros
 

Macros used by the assert_param function to check the different functions parameters.

 SPI_Exported_Functions
 TIM1_Exported_Types
 TIM1_Exported_Functions
 TIM3_Exported_Types
 TIM3_Exported_Functions
 TIM4_Exported_Types
 TIM4_Exported_Functions
 TIM6_Exported_Types
 TIM6_Private_Macros
 TIM6_Exported_Functions
 UART1_Exported_Types
 UART1_Private_Macros
 UART1_Exported_Functions
 UART2_Exported_Types
 UART2_Private_Macros
 UART2_Exported_Functions
 UART3_Exported_Types
 UART3_Private_Macros
 UART3_Exported_Functions
 UART4_Exported_Types
 UART4_Private_Macros
 UART4_Exported_Functions
 WWDG_Private_Macros
 WWDG_Exported_Functions
 ADC1_Public_Functions
 ADC2_Public_Functions
 AWU_Public_Functions
 BEEP_Public_Functions
 CAN_Public_Functions
 CLK_Private_Constants
 CLK_Public_Functions
 EXTI_Public_Functions
 FLASH_Public_functions
 GPIO_Public_Functions
 I2C_Private_Defines
 I2C_Public_Functions
 ITC_Private_Functions
 ITC_Public_Functions
 RST_Public_Functions
 SPI_Public_Functions
 TIM1_Public_Functions
 TIM2_Public_Functions
 TIM3_Public_Functions
 TIM4_Public_Functions
 TIM5_Public_Functions
 TIM6_Public_Functions
 UART1_Public_Functions
 UART2_Public_Functions
 UART3_Public_Functions
 UART4_Public_Functions
 WWDG_Public_Functions

Defines

#define __STM8S_STDPERIPH_VERSION
#define __STM8S_STDPERIPH_VERSION_MAIN   ((uint8_t)0x02)
#define __STM8S_STDPERIPH_VERSION_RC   ((uint8_t)0x00)
#define __STM8S_STDPERIPH_VERSION_SUB1   ((uint8_t)0x03)
#define __STM8S_STDPERIPH_VERSION_SUB2   ((uint8_t)0x00)
#define BIT_MASK   ((uint8_t)0x7F)
#define CAN_ACKNOWLEDGE_TIMEOUT   ((uint16_t)0xFFFF)
#define CAN_IDLIST_IDMASK_MASK   ((uint8_t) 0x55)
#define CAN_IDMASK_IDLIST_MASK   ((uint8_t) 0xAA)
#define CAN_MODE_MASK   ((uint8_t) 0x03)
#define CONST   const
#define EEPROM   __eeprom
#define FAR   __far
#define FLASH_CLEAR_BYTE   ((uint8_t)0x00)
#define FLASH_SET_BYTE   ((uint8_t)0xFF)
#define HSE_VALUE   ((uint32_t)16000000)
 In the following line adjust the value of External High Speed oscillator (HSE) used in your application.
#define HSI_VALUE   ((uint32_t)16000000)
 Definition of Device on-chip RC oscillator frequencies.
#define IN_RAM(a)   a
#define IS_TIM2_CHANNEL_OK(CHANNEL)
#define IS_TIM2_CLEAR_FLAG_OK(FLAG)   ((((uint16_t)(FLAG) & 0xF1F0) == 0x0000) && ((uint16_t)(FLAG) != 0x0000))
#define IS_TIM2_EVENT_SOURCE_OK(SOURCE)   (((SOURCE) != 0x00))
#define IS_TIM2_FORCED_ACTION_OK(ACTION)
#define IS_TIM2_GET_FLAG_OK(FLAG)
#define IS_TIM2_GET_IT_OK(IT)
#define IS_TIM2_IC_FILTER_OK(ICFILTER)   ((ICFILTER) <= 0x0F)
 TIM2 Input Capture Filer Value.
#define IS_TIM2_IC_POLARITY_OK(POLARITY)
#define IS_TIM2_IC_PRESCALER_OK(PRESCALER)
#define IS_TIM2_IC_SELECTION1_OK(SELECTION)
#define IS_TIM2_IC_SELECTION_OK(SELECTION)
#define IS_TIM2_IT_OK(IT)   (((IT) != 0x00) && ((IT) <= 0x0F))
#define IS_TIM2_OC_MODE_OK(MODE)
#define IS_TIM2_OC_POLARITY_OK(POLARITY)
#define IS_TIM2_OCM_OK(MODE)
#define IS_TIM2_OPM_MODE_OK(MODE)
#define IS_TIM2_OUTPUT_STATE_OK(STATE)
#define IS_TIM2_PRESCALER_OK(PRESCALER)
#define IS_TIM2_PRESCALER_RELOAD_OK(RELOAD)
#define IS_TIM2_PWMI_CHANNEL_OK(CHANNEL)
#define IS_TIM2_UPDATE_SOURCE_OK(SOURCE)
#define IS_TIM5_CHANNEL_OK(CHANNEL)
#define IS_TIM5_CLEAR_FLAG_OK(FLAG)   ((((uint16_t)(FLAG) & 0xF1F0) == 0x0000) && ((uint16_t)(FLAG) != 0x0000))
#define IS_TIM5_ENCODER_MODE_OK(MODE)
 Macro TIM5 encoder mode.
#define IS_TIM5_EVENT_SOURCE_OK(SOURCE)   (((SOURCE) != 0x00))
#define IS_TIM5_EXT_FILTER_OK(EXTFILTER)   ((EXTFILTER) <= 0x0F)
 Macro TIM5 External Trigger Filter.
#define IS_TIM5_EXT_POLARITY_OK(POLARITY)
 Macro TIM5 Trigger Polarity.
#define IS_TIM5_EXT_PRESCALER_OK(PRESCALER)
 Macro TIM5 external trigger prescaler.
#define IS_TIM5_FORCED_ACTION_OK(ACTION)
#define IS_TIM5_GET_FLAG_OK(FLAG)
#define IS_TIM5_GET_IT_OK(IT)
#define IS_TIM5_IC_FILTER_OK(ICFILTER)   ((ICFILTER) <= 0x0F)
 TIM5 Input Capture Filer Value.
#define IS_TIM5_IC_POLARITY_OK(POLARITY)
#define IS_TIM5_IC_PRESCALER_OK(PRESCALER)
#define IS_TIM5_IC_SELECTION1_OK(SELECTION)
#define IS_TIM5_IC_SELECTION_OK(SELECTION)
#define IS_TIM5_IT_OK(IT)   (((IT) != 0x00) && ((IT) <= 0x4F))
#define IS_TIM5_OC_MODE_OK(MODE)
#define IS_TIM5_OC_POLARITY_OK(POLARITY)
#define IS_TIM5_OCM_OK(MODE)
#define IS_TIM5_OPM_MODE_OK(MODE)
#define IS_TIM5_OUTPUT_STATE_OK(STATE)
#define IS_TIM5_PRESCALER_OK(PRESCALER)
#define IS_TIM5_PRESCALER_RELOAD_OK(RELOAD)
#define IS_TIM5_PWMI_CHANNEL_OK(CHANNEL)
#define IS_TIM5_SLAVE_MODE_OK(MODE)
 Macro TIM5 Slave mode.
#define IS_TIM5_TIX_TRIGGER_SELECTION_OK(SELECTION)
#define IS_TIM5_TRGO_SOURCE_OK(SOURCE)
 Macro TIM5 TRGO source.
#define IS_TIM5_TRIGGER_SELECTION_OK(SELECTION)
 Macro TIM5 Trigger Selection.
#define IS_TIM5_UPDATE_SOURCE_OK(SOURCE)
#define LSI_VALUE   ((uint32_t)128000)
#define MemoryAddressCast   uint32_t
#define NEAR   __near
#define OPERATION_TIMEOUT   ((uint16_t)0xFFFF)
#define PointerAttr   FAR
#define TINY   __tiny
#define USE_STDPERIPH_DRIVER

Enumerations

enum  TIM2_Channel_TypeDef { TIM2_CHANNEL_1 = ((uint8_t)0x00), TIM2_CHANNEL_2 = ((uint8_t)0x01), TIM2_CHANNEL_3 = ((uint8_t)0x02) }
 TIM2 Channel. More...
enum  TIM2_EventSource_TypeDef { TIM2_EVENTSOURCE_UPDATE = ((uint8_t)0x01), TIM2_EVENTSOURCE_CC1 = ((uint8_t)0x02), TIM2_EVENTSOURCE_CC2 = ((uint8_t)0x04), TIM2_EVENTSOURCE_CC3 = ((uint8_t)0x08) }
 TIM2 Event Source. More...
enum  TIM2_FLAG_TypeDef {
  TIM2_FLAG_UPDATE = ((uint16_t)0x0001), TIM2_FLAG_CC1 = ((uint16_t)0x0002), TIM2_FLAG_CC2 = ((uint16_t)0x0004), TIM2_FLAG_CC3 = ((uint16_t)0x0008),
  TIM2_FLAG_CC1OF = ((uint16_t)0x0200), TIM2_FLAG_CC2OF = ((uint16_t)0x0400), TIM2_FLAG_CC3OF = ((uint16_t)0x0800)
}
 TIM2 Flags. More...
enum  TIM2_ForcedAction_TypeDef { TIM2_FORCEDACTION_ACTIVE = ((uint8_t)0x50), TIM2_FORCEDACTION_INACTIVE = ((uint8_t)0x40) }
 TIM2 Forced Action. More...
enum  TIM2_ICPolarity_TypeDef { TIM2_ICPOLARITY_RISING = ((uint8_t)0x00), TIM2_ICPOLARITY_FALLING = ((uint8_t)0x44) }
 TIM2 Input Capture Polarity. More...
enum  TIM2_ICPSC_TypeDef { TIM2_ICPSC_DIV1 = ((uint8_t)0x00), TIM2_ICPSC_DIV2 = ((uint8_t)0x04), TIM2_ICPSC_DIV4 = ((uint8_t)0x08), TIM2_ICPSC_DIV8 = ((uint8_t)0x0C) }
 TIM2 Input Capture Prescaler. More...
enum  TIM2_ICSelection_TypeDef { TIM2_ICSELECTION_DIRECTTI = ((uint8_t)0x01), TIM2_ICSELECTION_INDIRECTTI = ((uint8_t)0x02), TIM2_ICSELECTION_TRGI = ((uint8_t)0x03) }
 TIM2 Input Capture Selection. More...
enum  TIM2_IT_TypeDef { TIM2_IT_UPDATE = ((uint8_t)0x01), TIM2_IT_CC1 = ((uint8_t)0x02), TIM2_IT_CC2 = ((uint8_t)0x04), TIM2_IT_CC3 = ((uint8_t)0x08) }
 TIM2 interrupt sources. More...
enum  TIM2_OCMode_TypeDef {
  TIM2_OCMODE_TIMING = ((uint8_t)0x00), TIM2_OCMODE_ACTIVE = ((uint8_t)0x10), TIM2_OCMODE_INACTIVE = ((uint8_t)0x20), TIM2_OCMODE_TOGGLE = ((uint8_t)0x30),
  TIM2_OCMODE_PWM1 = ((uint8_t)0x60), TIM2_OCMODE_PWM2 = ((uint8_t)0x70)
}
 TIM2 Output Compare and PWM modes. More...
enum  TIM2_OCPolarity_TypeDef { TIM2_OCPOLARITY_HIGH = ((uint8_t)0x00), TIM2_OCPOLARITY_LOW = ((uint8_t)0x22) }
 TIM2 Output Compare Polarity. More...
enum  TIM2_OPMode_TypeDef { TIM2_OPMODE_SINGLE = ((uint8_t)0x01), TIM2_OPMODE_REPETITIVE = ((uint8_t)0x00) }
 TIM2 One Pulse Mode. More...
enum  TIM2_OutputState_TypeDef { TIM2_OUTPUTSTATE_DISABLE = ((uint8_t)0x00), TIM2_OUTPUTSTATE_ENABLE = ((uint8_t)0x11) }
 TIM2 Output Compare states. More...
enum  TIM2_Prescaler_TypeDef {
  TIM2_PRESCALER_1 = ((uint8_t)0x00), TIM2_PRESCALER_2 = ((uint8_t)0x01), TIM2_PRESCALER_4 = ((uint8_t)0x02), TIM2_PRESCALER_8 = ((uint8_t)0x03),
  TIM2_PRESCALER_16 = ((uint8_t)0x04), TIM2_PRESCALER_32 = ((uint8_t)0x05), TIM2_PRESCALER_64 = ((uint8_t)0x06), TIM2_PRESCALER_128 = ((uint8_t)0x07),
  TIM2_PRESCALER_256 = ((uint8_t)0x08), TIM2_PRESCALER_512 = ((uint8_t)0x09), TIM2_PRESCALER_1024 = ((uint8_t)0x0A), TIM2_PRESCALER_2048 = ((uint8_t)0x0B),
  TIM2_PRESCALER_4096 = ((uint8_t)0x0C), TIM2_PRESCALER_8192 = ((uint8_t)0x0D), TIM2_PRESCALER_16384 = ((uint8_t)0x0E), TIM2_PRESCALER_32768 = ((uint8_t)0x0F)
}
 TIM2 Prescaler. More...
enum  TIM2_PSCReloadMode_TypeDef { TIM2_PSCRELOADMODE_UPDATE = ((uint8_t)0x00), TIM2_PSCRELOADMODE_IMMEDIATE = ((uint8_t)0x01) }
 TIM2 Prescaler Reload Mode. More...
enum  TIM2_UpdateSource_TypeDef { TIM2_UPDATESOURCE_GLOBAL = ((uint8_t)0x00), TIM2_UPDATESOURCE_REGULAR = ((uint8_t)0x01) }
 TIM2 Update Source. More...
enum  TIM5_Channel_TypeDef { TIM5_CHANNEL_1 = ((uint8_t)0x00), TIM5_CHANNEL_2 = ((uint8_t)0x01), TIM5_CHANNEL_3 = ((uint8_t)0x02) }
 TIM5 Channel. More...
enum  TIM5_EncoderMode_TypeDef { TIM5_ENCODERMODE_TI1 = ((uint8_t)0x01), TIM5_ENCODERMODE_TI2 = ((uint8_t)0x02), TIM5_ENCODERMODE_TI12 = ((uint8_t)0x03) }
 TIM5 Encoder Mode. More...
enum  TIM5_EventSource_TypeDef {
  TIM5_EVENTSOURCE_UPDATE = ((uint8_t)0x01), TIM5_EVENTSOURCE_CC1 = ((uint8_t)0x02), TIM5_EVENTSOURCE_CC2 = ((uint8_t)0x04), TIM5_EVENTSOURCE_CC3 = ((uint8_t)0x08),
  TIM5_EVENTSOURCE_TRIGGER = ((uint8_t)0x40)
}
 TIM5 Event Source. More...
enum  TIM5_ExtTRGPolarity_TypeDef { TIM5_EXTTRGPOLARITY_INVERTED = ((uint8_t)0x80), TIM5_EXTTRGPOLARITY_NONINVERTED = ((uint8_t)0x00) }
 TIM5 External Trigger Polarity. More...
enum  TIM5_ExtTRGPSC_TypeDef { TIM5_EXTTRGPSC_OFF = ((uint8_t)0x00), TIM5_EXTTRGPSC_DIV2 = ((uint8_t)0x10), TIM5_EXTTRGPSC_DIV4 = ((uint8_t)0x20), TIM5_EXTTRGPSC_DIV8 = ((uint8_t)0x30) }
 TIM5 External Trigger Prescaler. More...
enum  TIM5_FLAG_TypeDef {
  TIM5_FLAG_UPDATE = ((uint16_t)0x0001), TIM5_FLAG_CC1 = ((uint16_t)0x0002), TIM5_FLAG_CC2 = ((uint16_t)0x0004), TIM5_FLAG_CC3 = ((uint16_t)0x0008),
  TIM5_FLAG_TRIGGER = ((uint16_t)0x0040), TIM5_FLAG_CC1OF = ((uint16_t)0x0200), TIM5_FLAG_CC2OF = ((uint16_t)0x0400), TIM5_FLAG_CC3OF = ((uint16_t)0x0800)
}
 TIM5 Flags. More...
enum  TIM5_ForcedAction_TypeDef { TIM5_FORCEDACTION_ACTIVE = ((uint8_t)0x50), TIM5_FORCEDACTION_INACTIVE = ((uint8_t)0x40) }
 TIM5 Forced Action. More...
enum  TIM5_ICPolarity_TypeDef { TIM5_ICPOLARITY_RISING = ((uint8_t)0x00), TIM5_ICPOLARITY_FALLING = ((uint8_t)0x44) }
 TIM5 Input Capture Polarity. More...
enum  TIM5_ICPSC_TypeDef { TIM5_ICPSC_DIV1 = ((uint8_t)0x00), TIM5_ICPSC_DIV2 = ((uint8_t)0x04), TIM5_ICPSC_DIV4 = ((uint8_t)0x08), TIM5_ICPSC_DIV8 = ((uint8_t)0x0C) }
 TIM5 Input Capture Prescaler. More...
enum  TIM5_ICSelection_TypeDef { TIM5_ICSELECTION_DIRECTTI = ((uint8_t)0x01), TIM5_ICSELECTION_INDIRECTTI = ((uint8_t)0x02), TIM5_ICSELECTION_TRGI = ((uint8_t)0x03) }
 TIM5 Input Capture Selection. More...
enum  TIM5_IT_TypeDef {
  TIM5_IT_UPDATE = ((uint8_t)0x01), TIM5_IT_CC1 = ((uint8_t)0x02), TIM5_IT_CC2 = ((uint8_t)0x04), TIM5_IT_CC3 = ((uint8_t)0x08),
  TIM5_IT_TRIGGER = ((uint8_t)0x40)
}
 TIM5 interrupt sources. More...
enum  TIM5_OCMode_TypeDef {
  TIM5_OCMODE_TIMING = ((uint8_t)0x00), TIM5_OCMODE_ACTIVE = ((uint8_t)0x10), TIM5_OCMODE_INACTIVE = ((uint8_t)0x20), TIM5_OCMODE_TOGGLE = ((uint8_t)0x30),
  TIM5_OCMODE_PWM1 = ((uint8_t)0x60), TIM5_OCMODE_PWM2 = ((uint8_t)0x70)
}
 TIM5 Output Compare and PWM modes. More...
enum  TIM5_OCPolarity_TypeDef { TIM5_OCPOLARITY_HIGH = ((uint8_t)0x00), TIM5_OCPOLARITY_LOW = ((uint8_t)0x22) }
 TIM5 Output Compare Polarity. More...
enum  TIM5_OPMode_TypeDef { TIM5_OPMODE_SINGLE = ((uint8_t)0x01), TIM5_OPMODE_REPETITIVE = ((uint8_t)0x00) }
 TIM5 One Pulse Mode. More...
enum  TIM5_OutputState_TypeDef { TIM5_OUTPUTSTATE_DISABLE = ((uint8_t)0x00), TIM5_OUTPUTSTATE_ENABLE = ((uint8_t)0x11) }
 TIM5 Output Compare states. More...
enum  TIM5_Prescaler_TypeDef {
  TIM5_PRESCALER_1 = ((uint8_t)0x00), TIM5_PRESCALER_2 = ((uint8_t)0x01), TIM5_PRESCALER_4 = ((uint8_t)0x02), TIM5_PRESCALER_8 = ((uint8_t)0x03),
  TIM5_PRESCALER_16 = ((uint8_t)0x04), TIM5_PRESCALER_32 = ((uint8_t)0x05), TIM5_PRESCALER_64 = ((uint8_t)0x06), TIM5_PRESCALER_128 = ((uint8_t)0x07),
  TIM5_PRESCALER_256 = ((uint8_t)0x08), TIM5_PRESCALER_512 = ((uint8_t)0x09), TIM5_PRESCALER_1024 = ((uint8_t)0x0A), TIM5_PRESCALER_2048 = ((uint8_t)0x0B),
  TIM5_PRESCALER_4096 = ((uint8_t)0x0C), TIM5_PRESCALER_8192 = ((uint8_t)0x0D), TIM5_PRESCALER_16384 = ((uint8_t)0x0E), TIM5_PRESCALER_32768 = ((uint8_t)0x0F)
}
 TIM5 Prescaler. More...
enum  TIM5_PSCReloadMode_TypeDef { TIM5_PSCRELOADMODE_UPDATE = ((uint8_t)0x00), TIM5_PSCRELOADMODE_IMMEDIATE = ((uint8_t)0x01) }
 TIM5 Prescaler Reload Mode. More...
enum  TIM5_SlaveMode_TypeDef { TIM5_SLAVEMODE_RESET = ((uint8_t)0x04), TIM5_SLAVEMODE_GATED = ((uint8_t)0x05), TIM5_SLAVEMODE_TRIGGER = ((uint8_t)0x06), TIM5_SLAVEMODE_EXTERNAL1 = ((uint8_t)0x07) }
 TIM5 Slave Mode. More...
enum  TIM5_TRGOSource_TypeDef {
  TIM5_TRGOSOURCE_RESET = ((uint8_t)0x00), TIM5_TRGOSOURCE_ENABLE = ((uint8_t)0x10), TIM5_TRGOSOURCE_UPDATE = ((uint8_t)0x20), TIM5_TRGOSOURCE_OC1 = ((uint8_t)0x30),
  TIM5_TRGOSOURCE_OC1REF = ((uint8_t)0x40), TIM5_TRGOSOURCE_OC2REF = ((uint8_t)0x50)
}
 TIM5 Trigger Output Source. More...
enum  TIM5_TS_TypeDef { TIM5_TS_TIM6 = ((uint8_t)0x00), TIM5_TS_TIM1 = ((uint8_t)0x03) }
 TIM5 Internal Trigger Selection. More...
enum  TIM5_UpdateSource_TypeDef { TIM5_UPDATESOURCE_GLOBAL = ((uint8_t)0x00), TIM5_UPDATESOURCE_REGULAR = ((uint8_t)0x01) }
 TIM5 Update Source. More...

Variables

__IO uint8_t _Data [8] = {0}
__IO uint8_t _DLC = 0
__IO uint8_t _FMI = 0
__IO uint32_t _Id = 0
__IO uint8_t _IDE = 0
__IO uint8_t _RTR = 0
CONST uint8_t APR_Array [17]
 Contains the different values to write in the APR register (used by AWU_Init function)
CONST uint8_t TBR_Array [17]
 Contains the different values to write in the TBR register (used by AWU_Init function)

Define Documentation

#define __STM8S_STDPERIPH_VERSION
#define __STM8S_STDPERIPH_VERSION_MAIN   ((uint8_t)0x02)

< [31:16] STM8S Standard Peripheral Library main version V2.3.0 [31:24] main version

Definition at line 182 of file stm8s.h.

#define __STM8S_STDPERIPH_VERSION_RC   ((uint8_t)0x00)

[7:0] release candidate

Definition at line 185 of file stm8s.h.

#define __STM8S_STDPERIPH_VERSION_SUB1   ((uint8_t)0x03)

[23:16] sub1 version

Definition at line 183 of file stm8s.h.

#define __STM8S_STDPERIPH_VERSION_SUB2   ((uint8_t)0x00)

[15:8] sub2 version

Definition at line 184 of file stm8s.h.

#define BIT_MASK   ((uint8_t)0x7F)

Definition at line 35 of file stm8s_wwdg.c.

Referenced by WWDG_SetCounter().

#define CAN_ACKNOWLEDGE_TIMEOUT   ((uint16_t)0xFFFF)

Definition at line 39 of file stm8s_can.c.

Referenced by CAN_Init(), and CAN_OperatingModeRequest().

#define CAN_IDLIST_IDMASK_MASK   ((uint8_t) 0x55)

Definition at line 36 of file stm8s_can.c.

Referenced by CAN_FilterInit().

#define CAN_IDMASK_IDLIST_MASK   ((uint8_t) 0xAA)

Definition at line 37 of file stm8s_can.c.

Referenced by CAN_FilterInit().

#define CAN_MODE_MASK   ((uint8_t) 0x03)

Definition at line 38 of file stm8s_can.c.

Referenced by CAN_OperatingModeRequest().

#define CONST   const

Definition at line 146 of file stm8s.h.

#define EEPROM   __eeprom

Definition at line 145 of file stm8s.h.

#define FAR   __far

Definition at line 142 of file stm8s.h.

#define FLASH_CLEAR_BYTE   ((uint8_t)0x00)
 This driver provides functions to configure and program the Flash memory of all
 STM8S devices.

 It includes as well functions that can be either executed from RAM or not, and
 other functions that must be executed from RAM otherwise useless.

 The table below lists the functions that can be executed from RAM.

 +--------------------------------------------------------------------------------|
 |   Functions prototypes      |    RAM execution            |     Comments       |
 ---------------------------------------------------------------------------------|
 |                             | Mandatory in case of block  | Can be executed    |
 | FLASH_WaitForLastOperation  | Operation:                  | from Flash in case |
 |                             | - Block programming         | of byte and word   |
 |                             | - Block erase               | Operations         |
 |--------------------------------------------------------------------------------|
 | FLASH_ProgramBlock          |       Exclusively           | useless from Flash |
 |--------------------------------------------------------------------------------|
 | FLASH_EraseBlock            |       Exclusively           | useless from Flash |
 |--------------------------------------------------------------------------------|

 To be able to execute functions from RAM several steps have to be followed.
 These steps may differ from one toolchain to another.
 A detailed description is available below within this driver.
 You can also refer to the FLASH examples provided within the
 STM8S_StdPeriph_Lib package.

Definition at line 69 of file stm8s_flash.c.

Referenced by FLASH_EraseByte(), and FLASH_EraseOptionByte().

#define FLASH_SET_BYTE   ((uint8_t)0xFF)

Definition at line 70 of file stm8s_flash.c.

Referenced by FLASH_EraseOptionByte().

#define HSE_VALUE   ((uint32_t)16000000)

In the following line adjust the value of External High Speed oscillator (HSE) used in your application.

Tip: To avoid modifying this file each time you need to use different HSE, you can define the HSE value in your toolchain compiler preprocessor.

Definition at line 111 of file stm8s.h.

Referenced by CLK_GetClockFreq().

#define HSI_VALUE   ((uint32_t)16000000)

Definition of Device on-chip RC oscillator frequencies.

Typical Value of the HSI in Hz

Definition at line 118 of file stm8s.h.

Referenced by CLK_GetClockFreq().

#define IN_RAM (   a )    a

Definition at line 178 of file stm8s.h.

#define IS_TIM2_CHANNEL_OK (   CHANNEL)
Value:
(((CHANNEL) == TIM2_CHANNEL_1) || \
                                     ((CHANNEL) == TIM2_CHANNEL_2) || \
                                     ((CHANNEL) == TIM2_CHANNEL_3))

Definition at line 135 of file stm8s_tim2.h.

Referenced by TIM2_CCxCmd(), TIM2_ICInit(), and TIM2_SelectOCxM().

#define IS_TIM2_CLEAR_FLAG_OK (   FLAG)    ((((uint16_t)(FLAG) & 0xF1F0) == 0x0000) && ((uint16_t)(FLAG) != 0x0000))

Definition at line 271 of file stm8s_tim2.h.

Referenced by TIM2_ClearFlag().

#define IS_TIM2_EVENT_SOURCE_OK (   SOURCE)    (((SOURCE) != 0x00))

Definition at line 239 of file stm8s_tim2.h.

Referenced by TIM2_GenerateEvent().

#define IS_TIM2_FORCED_ACTION_OK (   ACTION)
Value:
(((ACTION) == TIM2_FORCEDACTION_ACTIVE) || \
    ((ACTION) == TIM2_FORCEDACTION_INACTIVE))

Definition at line 49 of file stm8s_tim2.h.

Referenced by TIM2_ForcedOC1Config(), TIM2_ForcedOC2Config(), and TIM2_ForcedOC3Config().

#define IS_TIM2_GET_FLAG_OK (   FLAG)
Value:
(((FLAG) == TIM2_FLAG_UPDATE) || \
                                   ((FLAG) == TIM2_FLAG_CC1) || \
                                   ((FLAG) == TIM2_FLAG_CC2) || \
                                   ((FLAG) == TIM2_FLAG_CC3) || \
                                   ((FLAG) == TIM2_FLAG_CC1OF) || \
                                   ((FLAG) == TIM2_FLAG_CC2OF) || \
                                   ((FLAG) == TIM2_FLAG_CC3OF))

Definition at line 263 of file stm8s_tim2.h.

Referenced by TIM2_GetFlagStatus().

#define IS_TIM2_GET_IT_OK (   IT)
Value:
(((IT) == TIM2_IT_UPDATE) || \
                               ((IT) == TIM2_IT_CC1) || \
                               ((IT) == TIM2_IT_CC2) || \
                               ((IT) == TIM2_IT_CC3))

Definition at line 215 of file stm8s_tim2.h.

Referenced by TIM2_GetITStatus().

#define IS_TIM2_IC_FILTER_OK (   ICFILTER)    ((ICFILTER) <= 0x0F)

TIM2 Input Capture Filer Value.

Definition at line 202 of file stm8s_tim2.h.

Referenced by TIM2_ICInit().

#define IS_TIM2_IC_POLARITY_OK (   POLARITY)
Value:
(((POLARITY) == TIM2_ICPOLARITY_RISING) || \
    ((POLARITY) == TIM2_ICPOLARITY_FALLING))

Definition at line 169 of file stm8s_tim2.h.

Referenced by TIM2_ICInit(), and TIM2_PWMIConfig().

#define IS_TIM2_IC_PRESCALER_OK (   PRESCALER)
Value:
(((PRESCALER) == TIM2_ICPSC_DIV1) || \
    ((PRESCALER) == TIM2_ICPSC_DIV2) || \
    ((PRESCALER) == TIM2_ICPSC_DIV4) || \
    ((PRESCALER) == TIM2_ICPSC_DIV8))

Definition at line 196 of file stm8s_tim2.h.

Referenced by TIM2_ICInit(), TIM2_PWMIConfig(), TIM2_SetIC1Prescaler(), TIM2_SetIC2Prescaler(), and TIM2_SetIC3Prescaler().

#define IS_TIM2_IC_SELECTION1_OK (   SELECTION)
Value:
(((SELECTION) == TIM2_ICSELECTION_DIRECTTI) || \
    ((SELECTION) == TIM2_ICSELECTION_TRGI))

Definition at line 184 of file stm8s_tim2.h.

#define IS_TIM2_IC_SELECTION_OK (   SELECTION)
Value:
(((SELECTION) == TIM2_ICSELECTION_DIRECTTI) || \
    ((SELECTION) == TIM2_ICSELECTION_INDIRECTTI) || \
    ((SELECTION) == TIM2_ICSELECTION_TRGI))

Definition at line 180 of file stm8s_tim2.h.

Referenced by TIM2_ICInit(), and TIM2_PWMIConfig().

#define IS_TIM2_IT_OK (   IT)    (((IT) != 0x00) && ((IT) <= 0x0F))

Definition at line 213 of file stm8s_tim2.h.

Referenced by TIM2_ClearITPendingBit(), and TIM2_ITConfig().

#define IS_TIM2_OC_MODE_OK (   MODE)
Value:
(((MODE) ==  TIM2_OCMODE_TIMING) || \
                                  ((MODE) == TIM2_OCMODE_ACTIVE) || \
                                  ((MODE) == TIM2_OCMODE_INACTIVE) || \
                                  ((MODE) == TIM2_OCMODE_TOGGLE)|| \
                                  ((MODE) == TIM2_OCMODE_PWM1) || \
                                  ((MODE) == TIM2_OCMODE_PWM2))

Definition at line 101 of file stm8s_tim2.h.

Referenced by TIM2_OC1Init(), TIM2_OC2Init(), and TIM2_OC3Init().

#define IS_TIM2_OC_POLARITY_OK (   POLARITY)
#define IS_TIM2_OCM_OK (   MODE)
Value:
(((MODE) ==  TIM2_OCMODE_TIMING) || \
                             ((MODE) == TIM2_OCMODE_ACTIVE) || \
                             ((MODE) == TIM2_OCMODE_INACTIVE) || \
                             ((MODE) == TIM2_OCMODE_TOGGLE)|| \
                             ((MODE) == TIM2_OCMODE_PWM1) || \
                             ((MODE) == TIM2_OCMODE_PWM2) || \
                             ((MODE) == (uint8_t)TIM2_FORCEDACTION_ACTIVE) || \
                             ((MODE) == (uint8_t)TIM2_FORCEDACTION_INACTIVE))

Definition at line 108 of file stm8s_tim2.h.

Referenced by TIM2_SelectOCxM().

#define IS_TIM2_OPM_MODE_OK (   MODE)
Value:
(((MODE) == TIM2_OPMODE_SINGLE) || \
                                   ((MODE) == TIM2_OPMODE_REPETITIVE))

Definition at line 124 of file stm8s_tim2.h.

Referenced by TIM2_SelectOnePulseMode().

#define IS_TIM2_OUTPUT_STATE_OK (   STATE)
Value:
(((STATE) == TIM2_OUTPUTSTATE_DISABLE) || \
                                        ((STATE) == TIM2_OUTPUTSTATE_ENABLE))

Definition at line 159 of file stm8s_tim2.h.

Referenced by TIM2_OC1Init(), TIM2_OC2Init(), and TIM2_OC3Init().

#define IS_TIM2_PRESCALER_OK (   PRESCALER)
Value:
(((PRESCALER) == TIM2_PRESCALER_1  ) || \
    ((PRESCALER) == TIM2_PRESCALER_2    ) || \
    ((PRESCALER) == TIM2_PRESCALER_4    ) || \
    ((PRESCALER) == TIM2_PRESCALER_8  ) || \
    ((PRESCALER) == TIM2_PRESCALER_16   ) || \
    ((PRESCALER) == TIM2_PRESCALER_32     ) || \
    ((PRESCALER) == TIM2_PRESCALER_64    ) || \
    ((PRESCALER) == TIM2_PRESCALER_128   ) || \
    ((PRESCALER) == TIM2_PRESCALER_256   ) || \
    ((PRESCALER) == TIM2_PRESCALER_512   ) || \
    ((PRESCALER) == TIM2_PRESCALER_1024  ) || \
    ((PRESCALER) == TIM2_PRESCALER_2048 ) || \
    ((PRESCALER) == TIM2_PRESCALER_4096 ) || \
    ((PRESCALER) == TIM2_PRESCALER_8192 ) || \
    ((PRESCALER) == TIM2_PRESCALER_16384 ) || \
    ((PRESCALER) == TIM2_PRESCALER_32768 ))

Definition at line 73 of file stm8s_tim2.h.

Referenced by TIM2_PrescalerConfig().

#define IS_TIM2_PRESCALER_RELOAD_OK (   RELOAD)
Value:
(((RELOAD) == TIM2_PSCRELOADMODE_UPDATE) || \
    ((RELOAD) == TIM2_PSCRELOADMODE_IMMEDIATE))

Definition at line 227 of file stm8s_tim2.h.

Referenced by TIM2_PrescalerConfig().

#define IS_TIM2_PWMI_CHANNEL_OK (   CHANNEL)
Value:
(((CHANNEL) == TIM2_CHANNEL_1) || \
    ((CHANNEL) == TIM2_CHANNEL_2))

Definition at line 139 of file stm8s_tim2.h.

Referenced by TIM2_PWMIConfig().

#define IS_TIM2_UPDATE_SOURCE_OK (   SOURCE)
Value:
(((SOURCE) == TIM2_UPDATESOURCE_GLOBAL) || \
    ((SOURCE) == TIM2_UPDATESOURCE_REGULAR))

Definition at line 248 of file stm8s_tim2.h.

Referenced by TIM2_UpdateRequestConfig().

#define IS_TIM5_CHANNEL_OK (   CHANNEL)
Value:
(((CHANNEL) == TIM5_CHANNEL_1) || \
                                     ((CHANNEL) == TIM5_CHANNEL_2) || \
                                     ((CHANNEL) == TIM5_CHANNEL_3))

Definition at line 135 of file stm8s_tim5.h.

Referenced by TIM5_CCxCmd(), TIM5_ICInit(), and TIM5_SelectOCxM().

#define IS_TIM5_CLEAR_FLAG_OK (   FLAG)    ((((uint16_t)(FLAG) & 0xF1F0) == 0x0000) && ((uint16_t)(FLAG) != 0x0000))

Definition at line 301 of file stm8s_tim5.h.

Referenced by TIM5_ClearFlag().

#define IS_TIM5_ENCODER_MODE_OK (   MODE)
Value:
(((MODE) == TIM5_ENCODERMODE_TI1) || \
    ((MODE) == TIM5_ENCODERMODE_TI2) || \
    ((MODE) == TIM5_ENCODERMODE_TI12))

Macro TIM5 encoder mode.

Definition at line 359 of file stm8s_tim5.h.

Referenced by TIM5_EncoderInterfaceConfig().

#define IS_TIM5_EVENT_SOURCE_OK (   SOURCE)    (((SOURCE) != 0x00))

Definition at line 242 of file stm8s_tim5.h.

Referenced by TIM5_GenerateEvent().

#define IS_TIM5_EXT_FILTER_OK (   EXTFILTER)    ((EXTFILTER) <= 0x0F)

Macro TIM5 External Trigger Filter.

Definition at line 403 of file stm8s_tim5.h.

#define IS_TIM5_EXT_POLARITY_OK (   POLARITY)
Value:
(((POLARITY) == TIM5_EXTTRGPOLARITY_INVERTED) || \
    ((POLARITY) == TIM5_EXTTRGPOLARITY_NONINVERTED))

Macro TIM5 Trigger Polarity.

Definition at line 396 of file stm8s_tim5.h.

#define IS_TIM5_EXT_PRESCALER_OK (   PRESCALER)
Value:
(((PRESCALER) == TIM5_EXTTRGPSC_OFF)  || \
    ((PRESCALER) == TIM5_EXTTRGPSC_DIV2) || \
    ((PRESCALER) == TIM5_EXTTRGPSC_DIV4) || \
    ((PRESCALER) == TIM5_EXTTRGPSC_DIV8))

Macro TIM5 external trigger prescaler.

Definition at line 378 of file stm8s_tim5.h.

#define IS_TIM5_FORCED_ACTION_OK (   ACTION)
Value:
(((ACTION) == TIM5_FORCEDACTION_ACTIVE) || \
                                       ((ACTION) == TIM5_FORCEDACTION_INACTIVE))

Definition at line 49 of file stm8s_tim5.h.

Referenced by TIM5_ForcedOC1Config(), TIM5_ForcedOC2Config(), and TIM5_ForcedOC3Config().

#define IS_TIM5_GET_FLAG_OK (   FLAG)
Value:
(((FLAG) == TIM5_FLAG_UPDATE) || \
                                ((FLAG) == TIM5_FLAG_CC1) || \
                                ((FLAG) == TIM5_FLAG_CC2) || \
                                ((FLAG) == TIM5_FLAG_CC3) || \
                                ((FLAG) == TIM5_FLAG_TRIGGER) || \
                                ((FLAG) == TIM5_FLAG_CC1OF) || \
                                ((FLAG) == TIM5_FLAG_CC2OF) || \
                                ((FLAG) == TIM5_FLAG_CC3OF))

Definition at line 292 of file stm8s_tim5.h.

Referenced by TIM5_GetFlagStatus().

#define IS_TIM5_GET_IT_OK (   IT)
Value:
(((IT) == TIM5_IT_UPDATE) || \
                            ((IT) == TIM5_IT_CC1) || \
                            ((IT) == TIM5_IT_CC2) || \
                            ((IT) == TIM5_IT_CC3) || \
                            ((IT) == TIM5_IT_TRIGGER))

Definition at line 216 of file stm8s_tim5.h.

Referenced by TIM5_GetITStatus().

#define IS_TIM5_IC_FILTER_OK (   ICFILTER)    ((ICFILTER) <= 0x0F)

TIM5 Input Capture Filer Value.

Definition at line 202 of file stm8s_tim5.h.

Referenced by TIM5_ICInit().

#define IS_TIM5_IC_POLARITY_OK (   POLARITY)
Value:
(((POLARITY) == TIM5_ICPOLARITY_RISING) || \
                                       ((POLARITY) == TIM5_ICPOLARITY_FALLING))

Definition at line 169 of file stm8s_tim5.h.

Referenced by TIM5_EncoderInterfaceConfig(), TIM5_ICInit(), and TIM5_PWMIConfig().

#define IS_TIM5_IC_PRESCALER_OK (   PRESCALER)
Value:
(((PRESCALER) == TIM5_ICPSC_DIV1) || \
                                         ((PRESCALER) == TIM5_ICPSC_DIV2) || \
                                         ((PRESCALER) == TIM5_ICPSC_DIV4) || \
                                         ((PRESCALER) == TIM5_ICPSC_DIV8))

Definition at line 196 of file stm8s_tim5.h.

Referenced by TIM5_ICInit(), TIM5_PWMIConfig(), TIM5_SetIC1Prescaler(), TIM5_SetIC2Prescaler(), and TIM5_SetIC3Prescaler().

#define IS_TIM5_IC_SELECTION1_OK (   SELECTION)
Value:
(((SELECTION) == TIM5_ICSELECTION_DIRECTTI) || \
                                             ((SELECTION) == TIM5_ICSELECTION_TRGI))

Definition at line 184 of file stm8s_tim5.h.

#define IS_TIM5_IC_SELECTION_OK (   SELECTION)
Value:
(((SELECTION) == TIM5_ICSELECTION_DIRECTTI) || \
                                           ((SELECTION) == TIM5_ICSELECTION_INDIRECTTI) || \
                                           ((SELECTION) == TIM5_ICSELECTION_TRGI))

Definition at line 180 of file stm8s_tim5.h.

Referenced by TIM5_ICInit(), and TIM5_PWMIConfig().

#define IS_TIM5_IT_OK (   IT)    (((IT) != 0x00) && ((IT) <= 0x4F))

Definition at line 214 of file stm8s_tim5.h.

Referenced by TIM5_ClearITPendingBit(), and TIM5_ITConfig().

#define IS_TIM5_OC_MODE_OK (   MODE)
Value:
(((MODE) ==  TIM5_OCMODE_TIMING) || \
                                  ((MODE) == TIM5_OCMODE_ACTIVE) || \
                                  ((MODE) == TIM5_OCMODE_INACTIVE) || \
                                  ((MODE) == TIM5_OCMODE_TOGGLE)|| \
                                  ((MODE) == TIM5_OCMODE_PWM1) || \
                                  ((MODE) == TIM5_OCMODE_PWM2))

Definition at line 101 of file stm8s_tim5.h.

Referenced by TIM5_OC1Init(), TIM5_OC2Init(), and TIM5_OC3Init().

#define IS_TIM5_OC_POLARITY_OK (   POLARITY)
#define IS_TIM5_OCM_OK (   MODE)
Value:
(((MODE) ==  TIM5_OCMODE_TIMING) || \
                             ((MODE) == TIM5_OCMODE_ACTIVE) || \
                             ((MODE) == TIM5_OCMODE_INACTIVE) || \
                             ((MODE) == TIM5_OCMODE_TOGGLE)|| \
                             ((MODE) == TIM5_OCMODE_PWM1) || \
                             ((MODE) == TIM5_OCMODE_PWM2) ||  \
                             ((MODE) == (uint8_t)TIM5_FORCEDACTION_ACTIVE) || \
                             ((MODE) == (uint8_t)TIM5_FORCEDACTION_INACTIVE))

Definition at line 108 of file stm8s_tim5.h.

Referenced by TIM5_SelectOCxM().

#define IS_TIM5_OPM_MODE_OK (   MODE)
Value:
(((MODE) == TIM5_OPMODE_SINGLE) || \
                                   ((MODE) == TIM5_OPMODE_REPETITIVE))

Definition at line 124 of file stm8s_tim5.h.

Referenced by TIM5_SelectOnePulseMode().

#define IS_TIM5_OUTPUT_STATE_OK (   STATE)
Value:
(((STATE) == TIM5_OUTPUTSTATE_DISABLE) || \
                                     ((STATE) == TIM5_OUTPUTSTATE_ENABLE))

Definition at line 159 of file stm8s_tim5.h.

Referenced by TIM5_OC1Init(), TIM5_OC2Init(), and TIM5_OC3Init().

#define IS_TIM5_PRESCALER_OK (   PRESCALER)
Value:
(((PRESCALER) == TIM5_PRESCALER_1) || \
                 ((PRESCALER) == TIM5_PRESCALER_2     ) || \
                 ((PRESCALER) == TIM5_PRESCALER_4     ) || \
                 ((PRESCALER) == TIM5_PRESCALER_8    ) || \
                 ((PRESCALER) == TIM5_PRESCALER_16    ) || \
                 ((PRESCALER) == TIM5_PRESCALER_32      ) || \
                 ((PRESCALER) == TIM5_PRESCALER_64     ) || \
                 ((PRESCALER) == TIM5_PRESCALER_128    ) || \
                 ((PRESCALER) == TIM5_PRESCALER_256    ) || \
                 ((PRESCALER) == TIM5_PRESCALER_512    ) || \
                 ((PRESCALER) == TIM5_PRESCALER_1024   ) || \
                 ((PRESCALER) == TIM5_PRESCALER_2048  ) || \
                 ((PRESCALER) == TIM5_PRESCALER_4096  ) || \
                 ((PRESCALER) == TIM5_PRESCALER_8192  ) || \
                 ((PRESCALER) == TIM5_PRESCALER_16384  ) || \
                 ((PRESCALER) == TIM5_PRESCALER_32768  ))

Definition at line 73 of file stm8s_tim5.h.

Referenced by TIM5_PrescalerConfig().

#define IS_TIM5_PRESCALER_RELOAD_OK (   RELOAD)
Value:
(((RELOAD) == TIM5_PSCRELOADMODE_UPDATE) || \
                                          ((RELOAD) == TIM5_PSCRELOADMODE_IMMEDIATE))

Definition at line 229 of file stm8s_tim5.h.

Referenced by TIM5_PrescalerConfig().

#define IS_TIM5_PWMI_CHANNEL_OK (   CHANNEL)
Value:
(((CHANNEL) == TIM5_CHANNEL_1) || \
                                          ((CHANNEL) == TIM5_CHANNEL_2))

Definition at line 139 of file stm8s_tim5.h.

Referenced by TIM5_PWMIConfig().

#define IS_TIM5_SLAVE_MODE_OK (   MODE)
Value:
(((MODE) == TIM5_SLAVEMODE_RESET)   || \
    ((MODE) == TIM5_SLAVEMODE_GATED)   || \
    ((MODE) == TIM5_SLAVEMODE_TRIGGER) || \
    ((MODE) == TIM5_SLAVEMODE_EXTERNAL1))

Macro TIM5 Slave mode.

Definition at line 318 of file stm8s_tim5.h.

Referenced by TIM5_SelectSlaveMode().

#define IS_TIM5_TIX_TRIGGER_SELECTION_OK (   SELECTION)
Value:
(((SELECTION) == TIM5_TS_TI1F_ED) || \
    ((SELECTION) == TIM5_TS_TI1FP1)  || \
    ((SELECTION) == TIM5_TS_TI2FP2))

Definition at line 341 of file stm8s_tim5.h.

#define IS_TIM5_TRGO_SOURCE_OK (   SOURCE)
Value:
(((SOURCE) == TIM5_TRGOSOURCE_RESET)  || \
    ((SOURCE) == TIM5_TRGOSOURCE_ENABLE) || \
    ((SOURCE) == TIM5_TRGOSOURCE_UPDATE) || \
    ((SOURCE) == TIM5_TRGOSOURCE_OC1)    || \
    ((SOURCE) == TIM5_TRGOSOURCE_OC1REF) || \
    ((SOURCE) == TIM5_TRGOSOURCE_OC2REF))

Macro TIM5 TRGO source.

Definition at line 271 of file stm8s_tim5.h.

Referenced by TIM5_SelectOutputTrigger().

#define IS_TIM5_TRIGGER_SELECTION_OK (   SELECTION)
Value:
(((SELECTION) == TIM5_TS_TIM6)  || \
    ((SELECTION) == TIM5_TS_TIM1)  )

Macro TIM5 Trigger Selection.

Definition at line 336 of file stm8s_tim5.h.

Referenced by TIM5_SelectInputTrigger().

#define IS_TIM5_UPDATE_SOURCE_OK (   SOURCE)
Value:
(((SOURCE) == TIM5_UPDATESOURCE_GLOBAL) || \
                                       ((SOURCE) == TIM5_UPDATESOURCE_REGULAR))

Definition at line 252 of file stm8s_tim5.h.

Referenced by TIM5_UpdateRequestConfig().

#define LSI_VALUE   ((uint32_t)128000)

Typical Value of the LSI in Hz

Definition at line 119 of file stm8s.h.

Referenced by CLK_GetClockFreq().

#define MemoryAddressCast   uint32_t

Definition at line 161 of file stm8s.h.

Referenced by FLASH_EraseByte(), FLASH_ProgramByte(), FLASH_ProgramWord(), and FLASH_ReadByte().

#define NEAR   __near

Definition at line 143 of file stm8s.h.

Referenced by FLASH_EraseOptionByte(), FLASH_ProgramOptionByte(), and FLASH_ReadOptionByte().

#define OPERATION_TIMEOUT   ((uint16_t)0xFFFF)

Definition at line 71 of file stm8s_flash.c.

#define PointerAttr   FAR

< Used with memory Models for code higher than 64K

Definition at line 160 of file stm8s.h.

Referenced by FLASH_EraseByte(), FLASH_ProgramByte(), FLASH_ProgramWord(), and FLASH_ReadByte().

#define TINY   __tiny

Definition at line 144 of file stm8s.h.

#define USE_STDPERIPH_DRIVER

< STM8S High density devices with CAN

< STM8S High density devices without CAN

< STM8S Value Line High density devices

< STM8A High density devices with CAN

< STM8A High density devices without CAN

< STM8S Medium density devices

< STM8S Value Line Medium density devices

< STM8A Medium density devices

< STM8A Low density devices

< STM8S Low density devices

< STM8S Value Line Low density devices

< STM8S Low density devices

< STM8S Value Line Low denisty devices

Definition at line 96 of file stm8s.h.


Enumeration Type Documentation

TIM2 Channel.

Enumerator:
TIM2_CHANNEL_1 
TIM2_CHANNEL_2 
TIM2_CHANNEL_3 

Definition at line 128 of file stm8s_tim2.h.

TIM2 Event Source.

Enumerator:
TIM2_EVENTSOURCE_UPDATE 
TIM2_EVENTSOURCE_CC1 
TIM2_EVENTSOURCE_CC2 
TIM2_EVENTSOURCE_CC3 

Definition at line 231 of file stm8s_tim2.h.

TIM2 Flags.

Enumerator:
TIM2_FLAG_UPDATE 
TIM2_FLAG_CC1 
TIM2_FLAG_CC2 
TIM2_FLAG_CC3 
TIM2_FLAG_CC1OF 
TIM2_FLAG_CC2OF 
TIM2_FLAG_CC3OF 

Definition at line 252 of file stm8s_tim2.h.

TIM2 Forced Action.

Enumerator:
TIM2_FORCEDACTION_ACTIVE 
TIM2_FORCEDACTION_INACTIVE 

Definition at line 43 of file stm8s_tim2.h.

TIM2 Input Capture Polarity.

Enumerator:
TIM2_ICPOLARITY_RISING 
TIM2_ICPOLARITY_FALLING 

Definition at line 163 of file stm8s_tim2.h.

TIM2 Input Capture Prescaler.

Enumerator:
TIM2_ICPSC_DIV1 
TIM2_ICPSC_DIV2 
TIM2_ICPSC_DIV4 
TIM2_ICPSC_DIV8 

Definition at line 188 of file stm8s_tim2.h.

TIM2 Input Capture Selection.

Enumerator:
TIM2_ICSELECTION_DIRECTTI 
TIM2_ICSELECTION_INDIRECTTI 
TIM2_ICSELECTION_TRGI 

Definition at line 173 of file stm8s_tim2.h.

TIM2 interrupt sources.

Enumerator:
TIM2_IT_UPDATE 
TIM2_IT_CC1 
TIM2_IT_CC2 
TIM2_IT_CC3 

Definition at line 205 of file stm8s_tim2.h.

TIM2 Output Compare and PWM modes.

Enumerator:
TIM2_OCMODE_TIMING 
TIM2_OCMODE_ACTIVE 
TIM2_OCMODE_INACTIVE 
TIM2_OCMODE_TOGGLE 
TIM2_OCMODE_PWM1 
TIM2_OCMODE_PWM2 

Definition at line 91 of file stm8s_tim2.h.

TIM2 Output Compare Polarity.

Enumerator:
TIM2_OCPOLARITY_HIGH 
TIM2_OCPOLARITY_LOW 

Definition at line 143 of file stm8s_tim2.h.

TIM2 One Pulse Mode.

Enumerator:
TIM2_OPMODE_SINGLE 
TIM2_OPMODE_REPETITIVE 

Definition at line 118 of file stm8s_tim2.h.

TIM2 Output Compare states.

Enumerator:
TIM2_OUTPUTSTATE_DISABLE 
TIM2_OUTPUTSTATE_ENABLE 

Definition at line 153 of file stm8s_tim2.h.

TIM2 Prescaler.

Enumerator:
TIM2_PRESCALER_1 
TIM2_PRESCALER_2 
TIM2_PRESCALER_4 
TIM2_PRESCALER_8 
TIM2_PRESCALER_16 
TIM2_PRESCALER_32 
TIM2_PRESCALER_64 
TIM2_PRESCALER_128 
TIM2_PRESCALER_256 
TIM2_PRESCALER_512 
TIM2_PRESCALER_1024 
TIM2_PRESCALER_2048 
TIM2_PRESCALER_4096 
TIM2_PRESCALER_8192 
TIM2_PRESCALER_16384 
TIM2_PRESCALER_32768 

Definition at line 53 of file stm8s_tim2.h.

TIM2 Prescaler Reload Mode.

Enumerator:
TIM2_PSCRELOADMODE_UPDATE 
TIM2_PSCRELOADMODE_IMMEDIATE 

Definition at line 221 of file stm8s_tim2.h.

TIM2 Update Source.

Enumerator:
TIM2_UPDATESOURCE_GLOBAL 
TIM2_UPDATESOURCE_REGULAR 

Definition at line 242 of file stm8s_tim2.h.

TIM5 Channel.

Enumerator:
TIM5_CHANNEL_1 
TIM5_CHANNEL_2 
TIM5_CHANNEL_3 

Definition at line 128 of file stm8s_tim5.h.

TIM5 Encoder Mode.

Enumerator:
TIM5_ENCODERMODE_TI1 

Encoder mode 1

TIM5_ENCODERMODE_TI2 

Encoder mode 2

TIM5_ENCODERMODE_TI12 

Encoder mode 3

Definition at line 350 of file stm8s_tim5.h.

TIM5 Event Source.

Enumerator:
TIM5_EVENTSOURCE_UPDATE 
TIM5_EVENTSOURCE_CC1 
TIM5_EVENTSOURCE_CC2 
TIM5_EVENTSOURCE_CC3 
TIM5_EVENTSOURCE_TRIGGER 

Definition at line 233 of file stm8s_tim5.h.

TIM5 External Trigger Polarity.

Enumerator:
TIM5_EXTTRGPOLARITY_INVERTED 

External Trigger Polarity = inverted

TIM5_EXTTRGPOLARITY_NONINVERTED 

External Trigger Polarity = non inverted

Definition at line 387 of file stm8s_tim5.h.

TIM5 External Trigger Prescaler.

Enumerator:
TIM5_EXTTRGPSC_OFF 

No External Trigger prescaler

TIM5_EXTTRGPSC_DIV2 

External Trigger prescaler = 2 (ETRP frequency divided by 2)

TIM5_EXTTRGPSC_DIV4 

External Trigger prescaler = 4 (ETRP frequency divided by 4)

TIM5_EXTTRGPSC_DIV8 

External Trigger prescaler = 8 (ETRP frequency divided by 8)

Definition at line 367 of file stm8s_tim5.h.

TIM5 Flags.

Enumerator:
TIM5_FLAG_UPDATE 
TIM5_FLAG_CC1 
TIM5_FLAG_CC2 
TIM5_FLAG_CC3 
TIM5_FLAG_TRIGGER 
TIM5_FLAG_CC1OF 
TIM5_FLAG_CC2OF 
TIM5_FLAG_CC3OF 

Definition at line 280 of file stm8s_tim5.h.

TIM5 Forced Action.

Enumerator:
TIM5_FORCEDACTION_ACTIVE 
TIM5_FORCEDACTION_INACTIVE 

Definition at line 43 of file stm8s_tim5.h.

TIM5 Input Capture Polarity.

Enumerator:
TIM5_ICPOLARITY_RISING 
TIM5_ICPOLARITY_FALLING 

Definition at line 163 of file stm8s_tim5.h.

TIM5 Input Capture Prescaler.

Enumerator:
TIM5_ICPSC_DIV1 
TIM5_ICPSC_DIV2 
TIM5_ICPSC_DIV4 
TIM5_ICPSC_DIV8 

Definition at line 188 of file stm8s_tim5.h.

TIM5 Input Capture Selection.

Enumerator:
TIM5_ICSELECTION_DIRECTTI 
TIM5_ICSELECTION_INDIRECTTI 
TIM5_ICSELECTION_TRGI 

Definition at line 173 of file stm8s_tim5.h.

TIM5 interrupt sources.

Enumerator:
TIM5_IT_UPDATE 
TIM5_IT_CC1 
TIM5_IT_CC2 
TIM5_IT_CC3 
TIM5_IT_TRIGGER 

Definition at line 205 of file stm8s_tim5.h.

TIM5 Output Compare and PWM modes.

Enumerator:
TIM5_OCMODE_TIMING 
TIM5_OCMODE_ACTIVE 
TIM5_OCMODE_INACTIVE 
TIM5_OCMODE_TOGGLE 
TIM5_OCMODE_PWM1 
TIM5_OCMODE_PWM2 

Definition at line 91 of file stm8s_tim5.h.

TIM5 Output Compare Polarity.

Enumerator:
TIM5_OCPOLARITY_HIGH 
TIM5_OCPOLARITY_LOW 

Definition at line 143 of file stm8s_tim5.h.

TIM5 One Pulse Mode.

Enumerator:
TIM5_OPMODE_SINGLE 
TIM5_OPMODE_REPETITIVE 

Definition at line 118 of file stm8s_tim5.h.

TIM5 Output Compare states.

Enumerator:
TIM5_OUTPUTSTATE_DISABLE 
TIM5_OUTPUTSTATE_ENABLE 

Definition at line 153 of file stm8s_tim5.h.

TIM5 Prescaler.

Enumerator:
TIM5_PRESCALER_1 
TIM5_PRESCALER_2 
TIM5_PRESCALER_4 
TIM5_PRESCALER_8 
TIM5_PRESCALER_16 
TIM5_PRESCALER_32 
TIM5_PRESCALER_64 
TIM5_PRESCALER_128 
TIM5_PRESCALER_256 
TIM5_PRESCALER_512 
TIM5_PRESCALER_1024 
TIM5_PRESCALER_2048 
TIM5_PRESCALER_4096 
TIM5_PRESCALER_8192 
TIM5_PRESCALER_16384 
TIM5_PRESCALER_32768 

Definition at line 53 of file stm8s_tim5.h.

TIM5 Prescaler Reload Mode.

Enumerator:
TIM5_PSCRELOADMODE_UPDATE 
TIM5_PSCRELOADMODE_IMMEDIATE 

Definition at line 223 of file stm8s_tim5.h.

TIM5 Slave Mode.

Enumerator:
TIM5_SLAVEMODE_RESET 

Slave Mode Selection = Reset

TIM5_SLAVEMODE_GATED 

Slave Mode Selection = Gated

TIM5_SLAVEMODE_TRIGGER 

Slave Mode Selection = Trigger

TIM5_SLAVEMODE_EXTERNAL1 

Slave Mode Selection = External 1

Definition at line 307 of file stm8s_tim5.h.

TIM5 Trigger Output Source.

Enumerator:
TIM5_TRGOSOURCE_RESET 

Trigger Output source = Reset

TIM5_TRGOSOURCE_ENABLE 

Trigger Output source = TIM5 is enabled

TIM5_TRGOSOURCE_UPDATE 

Trigger Output source = Update event

TIM5_TRGOSOURCE_OC1 

Trigger Output source = output compare channel1

TIM5_TRGOSOURCE_OC1REF 

Trigger Output source = output compare channel 1 reference

TIM5_TRGOSOURCE_OC2REF 

Trigger Output source = output compare channel 2 reference

Definition at line 258 of file stm8s_tim5.h.

TIM5 Internal Trigger Selection.

Enumerator:
TIM5_TS_TIM6 

TRIG Input source = TIM6 TRIG Output

TIM5_TS_TIM1 

TRIG Input source = TIM1 TRIG Output

Definition at line 327 of file stm8s_tim5.h.

TIM5 Update Source.

Enumerator:
TIM5_UPDATESOURCE_GLOBAL 
TIM5_UPDATESOURCE_REGULAR 

Definition at line 245 of file stm8s_tim5.h.


Variable Documentation

__IO uint8_t _Data[8] = {0}

Definition at line 46 of file stm8s_can.c.

Referenced by CAN_GetReceivedData(), and CAN_Receive().

__IO uint8_t _DLC = 0

Definition at line 45 of file stm8s_can.c.

Referenced by CAN_GetReceivedDLC(), and CAN_Receive().

__IO uint8_t _FMI = 0

Definition at line 47 of file stm8s_can.c.

Referenced by CAN_GetReceivedFMI(), and CAN_Receive().

__IO uint32_t _Id = 0

Definition at line 42 of file stm8s_can.c.

Referenced by CAN_GetReceivedId(), and CAN_Receive().

__IO uint8_t _IDE = 0

Definition at line 43 of file stm8s_can.c.

Referenced by CAN_GetReceivedIDE(), and CAN_Receive().

__IO uint8_t _RTR = 0

Definition at line 44 of file stm8s_can.c.

Referenced by CAN_GetReceivedRTR(), and CAN_Receive().

CONST uint8_t APR_Array[17]
Initial value:
    {
        0, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 61, 23, 23, 62
    }

Contains the different values to write in the APR register (used by AWU_Init function)

Definition at line 49 of file stm8s_awu.c.

Referenced by AWU_Init().

CONST uint8_t TBR_Array[17]
Initial value:
    {
        0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 12, 14, 15, 15
    }

Contains the different values to write in the TBR register (used by AWU_Init function)

Definition at line 55 of file stm8s_awu.c.

Referenced by AWU_Init().

STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com