HPM APP
HPMicro Application solution
gpio_led.c File Reference
#include "gpio_led.h"

Functions

void init_led_pins (void)
 Initialize the control pins of the LED light ;初始化LED灯的控制引脚 More...
 
void led_red_error (void)
 The red LED light is on, indicating that the current status is error ;红色LED灯亮,表示当前状态为error. More...
 
void led_green_ok (void)
 The green LED light is on, indicating that the current status is OK ;绿色LED灯亮,表示当前状态为ok. More...
 
void led_blue_work (void)
 The blue LED light is on, indicating that the current status is work ;蓝色LED灯亮,表示当前状态为work. More...
 
void init_led_diplay_pins (void)
 Initialize LED display control pins ;初始化LED显示控制引脚 More...
 
void init_led_dig_pins (void)
 Initialize LED display tube power supply control pins ;初始化LED显示管供电控制引脚 More...
 
void led_dig_enable (uint8_t index)
 LED display tube enable, 5 LED display tubes in total from 0 to 4 ;LED显示管使能,0~4共5个LED显示管 More...
 
void led_dig_disable (uint8_t index)
 LED display tube disable, 5 LED display tubes in total from 0 to 4 ;LED显示管禁用,0~4共5个LED显示管 More...
 
void led_dig_disable_all (void)
 Disable all LED display tubes ;禁用所有的LED显示管
More...
 
void led_diplay_point (void)
 LED digital tube displays decimal point ;LED数码管显示小数点
More...
 
void led_display_number (uint8_t number)
 LED digital tube displays numbers ;LED数码管显示数字 More...
 
void led_display_float (float number)
 LED digital tube displays floating-point numbers ;LED数码管显示浮点数 More...
 
void led_display_speed (float speed)
 LED digital display speed ;LED数码管显示速度 More...
 
void init_led_display (void)
 Initialize LED digital display function ;初始化LED数码管显示功能
More...
 

Variables

uint8_t led_dig_ctr [5] = {LED_DIG_4,LED_DIG_3,LED_DIG_2,LED_DIG_1,LED_DIG_0}
 
uint8_t led_number_array [10][8]
 

Function Documentation

◆ init_led_dig_pins()

void init_led_dig_pins ( void  )

Initialize LED display tube power supply control pins ;初始化LED显示管供电控制引脚

◆ init_led_diplay_pins()

void init_led_diplay_pins ( void  )

Initialize LED display control pins ;初始化LED显示控制引脚

◆ init_led_display()

void init_led_display ( void  )

Initialize LED digital display function ;初始化LED数码管显示功能

◆ init_led_pins()

void init_led_pins ( void  )

Initialize the control pins of the LED light ;初始化LED灯的控制引脚

◆ led_blue_work()

void led_blue_work ( void  )

The blue LED light is on, indicating that the current status is work ;蓝色LED灯亮,表示当前状态为work.

◆ led_dig_disable()

void led_dig_disable ( uint8_t  index)

LED display tube disable, 5 LED display tubes in total from 0 to 4 ;LED显示管禁用,0~4共5个LED显示管

Parameters
[in]index0~4 respectively represent the 5 LED display tubes from the lowest position to the highest position;0~4分别表示最低位到最高位的5个LED显示管

◆ led_dig_disable_all()

void led_dig_disable_all ( void  )

Disable all LED display tubes ;禁用所有的LED显示管

◆ led_dig_enable()

void led_dig_enable ( uint8_t  index)

LED display tube enable, 5 LED display tubes in total from 0 to 4 ;LED显示管使能,0~4共5个LED显示管

Parameters
[in]index0~4 respectively represent the 5 LED display tubes from the lowest position to the highest position;0~4分别表示最低位到最高位的5个LED显示管

◆ led_diplay_point()

void led_diplay_point ( void  )

LED digital tube displays decimal point ;LED数码管显示小数点

◆ led_display_float()

void led_display_float ( float  number)

LED digital tube displays floating-point numbers ;LED数码管显示浮点数

Parameters
[in]numberFloating point data, supporting up to 5 positive floating-point numbers ;浮点数据,最多支持5位的正浮点数

◆ led_display_number()

void led_display_number ( uint8_t  number)

LED digital tube displays numbers ;LED数码管显示数字

Parameters
[in]number数字0~9;Numbers 0~9

◆ led_display_speed()

void led_display_speed ( float  speed)

LED digital display speed ;LED数码管显示速度

Parameters
[in]speedSpeed value, supports up to 5 positive floating-point numbers ;速度值,最多支持5位的正浮点数

◆ led_green_ok()

void led_green_ok ( void  )

The green LED light is on, indicating that the current status is OK ;绿色LED灯亮,表示当前状态为ok.

◆ led_red_error()

void led_red_error ( void  )

The red LED light is on, indicating that the current status is error ;红色LED灯亮,表示当前状态为error.

Variable Documentation

◆ led_dig_ctr

uint8_t led_dig_ctr[5] = {LED_DIG_4,LED_DIG_3,LED_DIG_2,LED_DIG_1,LED_DIG_0}

◆ led_number_array

uint8_t led_number_array[10][8]