STM8S/A Standard Peripherals Firmware Library: CAN_Networking

STM8S/A

STM8S/A Standard Peripherals Firmware Library
CAN_Networking

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

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:
nCountthe 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:
Ledstatusthe 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:
Ledstatusthe 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().


Variable Documentation

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().

STM8 Standard Peripherals Library: Footer

 

 

 

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