STM8S/A Standard Peripherals Firmware Library
|
Functions | |
void | CAN_Config (void) |
Configures the CAN mode and filter. | |
void | CLK_Config (void) |
Configure system clock to run at 16Mhz. | |
void | Delay (uint16_t nCount) |
Generates a delay time. | |
void | GPIO_Config (void) |
Configure GPIO for LEDs and buttons available on the evaluation board. | |
void | LCD_Config (void) |
Configure the LCD available on the evaluation board. | |
void | LCD_Display (uint8_t Ledstatus) |
Display led status and communication direction on the LCD. | |
void | LED_Display (uint8_t Ledstatus) |
Display led status. | |
void | main (void) |
Main program. | |
Variables | |
uint8_t | Key_Pressed_Number = 0x00 |
__IO uint8_t | Key_status = 0x00 |
Function Documentation
void CAN_Config | ( | void | ) |
Configures the CAN mode and filter.
- Parameters:
-
None
- Return values:
-
None
Definition at line 124 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
References CAN_BitSeg1_8TimeQuantum, CAN_BitSeg2_7TimeQuantum, CAN_DeInit(), CAN_FilterInit(), CAN_FilterMode_IdMask, CAN_FilterNumber_0, CAN_FilterScale_32Bit, CAN_Init(), CAN_InitStatus_Failed, CAN_IT_FMP, CAN_ITConfig(), CAN_MasterCtrl_AllDisabled, CAN_Mode_Normal, CAN_SynJumpWidth_1TimeQuantum, and ENABLE.
Referenced by main().
static void CLK_Config | ( | void | ) |
Configure system clock to run at 16Mhz.
Configure system clock to run at Maximum clock speed and output the system clock on CCO pin.
Configure system clock to run at 16Mhz and output the system clock on CCO pin.
Configure system clock to use HSE as source clock and to enable the Clock Security System (CSS)
- Parameters:
-
None
- Return values:
-
None
Definition at line 112 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
References CLK_HSIPrescalerConfig(), and CLK_PRESCALER_HSIDIV1.
void Delay | ( | uint16_t | nCount | ) |
Generates a delay time.
Delay.
- Parameters:
-
nCount the value for looping.
- Return values:
-
None
Definition at line 302 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
static void GPIO_Config | ( | void | ) |
Configure GPIO for LEDs and buttons available on the evaluation board.
Configures the Leds and the Buttons IO.
Configures the different GPIO ports.
Configure GPIO for Leds and buttons available on the evaluation board.
Configures the Multiplexer on the evaluation board to select the IrDA.
Configures the Multiplexer on the evaluation board to select the IrDA and initialize GPIO for LEDs.
Configure LEDs available on the evaluation board.
Configure UART1 Tx pin as Output open-drain high-impedance level.
Configure GPIO.
Configure PG6 to allow delay of TIM2 channels computation.
Initialize LED1 and Key Button mounted on the evaluation board.
Configure GPIO for buttons and LEDs available on the evaluation board.
Configure GPIO for buttons and Leds available on the evaluation board.
Configure GPIO for button available on the evaluation board.
Configure GPIO for buttons available on the evaluation board.
Configure GPIO for LEDs available on the evaluation board.
- Parameters:
-
None
- Return values:
-
None
Definition at line 191 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
static void LCD_Config | ( | void | ) |
Configure the LCD available on the evaluation board.
- Parameters:
-
None
- Return values:
-
None
Definition at line 214 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
References LCD_Clear(), LCD_LINE1, LCD_LINE2, LCD_Print(), LCD_SetCursorPos(), and STM8S_EVAL_LCD_Init().
void LCD_Display | ( | uint8_t | Ledstatus | ) |
Display led status and communication direction on the LCD.
- Parameters:
-
Ledstatus the led status
- Return values:
-
None
Definition at line 265 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
References LCD_LINE2, LCD_Print(), and LCD_SetCursorPos().
Referenced by main().
void LED_Display | ( | uint8_t | Ledstatus | ) |
Display led status.
- Parameters:
-
Ledstatus the led to set ON, other leds are set OFF
- Return values:
-
None
Definition at line 235 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
References LED1, LED2, LED3, LED4, STM_EVAL_LEDOff(), and STM_EVAL_LEDOn().
Referenced by main().
void main | ( | void | ) |
Main program.
- Parameters:
-
None
- Return values:
-
None
Definition at line 46 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
References CAN_Config(), CAN_Id_Standard, CAN_RTR_Data, CAN_Transmit(), CAN_TxStatus_Failed, CLK_Config(), Delay(), enableInterrupts, GPIO_Config(), Key_NoPressed, Key_Pressed_Number, Key_status, LCD_Config(), LCD_Display(), LED_Display(), and TIME.
Variable Documentation
uint8_t Key_Pressed_Number = 0x00 |
Definition at line 36 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
Referenced by main().
__IO uint8_t Key_status = 0x00 |
Definition at line 37 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
Referenced by main().