first commit v2.0.1
This commit is contained in:
49
CHIRP/board/bsp_misc_gd32e230.c
Normal file
49
CHIRP/board/bsp_misc_gd32e230.c
Normal file
@@ -0,0 +1,49 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gd32e23x.h"
|
||||
#include "systick.h"
|
||||
|
||||
#include "chirp_smartsonic.h"
|
||||
#include "soniclib.h"
|
||||
#include "chirp_bsp.h"
|
||||
|
||||
#include "board_init.h"
|
||||
#include "chirp_board_config.h"
|
||||
|
||||
#include "app_config.h"
|
||||
|
||||
|
||||
void sensor_led_on(void) {
|
||||
gpio_bit_reset(CHIRP_PIN_LED_PORT, CHIRP_PIN_LED_PIN); // PB1 = Lo LED = On
|
||||
}
|
||||
|
||||
void sensor_led_off(void) {
|
||||
gpio_bit_set(CHIRP_PIN_LED_PORT, CHIRP_PIN_LED_PIN); // PB1 = Hi LED = Off
|
||||
}
|
||||
|
||||
void sensor_led_toggle(void)
|
||||
{
|
||||
gpio_bit_toggle(CHIRP_PIN_LED_PORT, CHIRP_PIN_LED_PIN);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Indicate Board Alive
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
\note LED Heart Beat
|
||||
*/
|
||||
void indicate_alive(void){
|
||||
gpio_bit_reset(CHIRP_PIN_LED_PORT, CHIRP_PIN_LED_PIN); // PB1 = Lo LED = On
|
||||
delay_ms(100);
|
||||
gpio_bit_set(CHIRP_PIN_LED_PORT, CHIRP_PIN_LED_PIN); // PB1 = Hi LED = Off
|
||||
delay_ms(100);
|
||||
gpio_bit_reset(CHIRP_PIN_LED_PORT, CHIRP_PIN_LED_PIN); // PB1 = Lo LED = On
|
||||
delay_ms(100);
|
||||
gpio_bit_set(CHIRP_PIN_LED_PORT, CHIRP_PIN_LED_PIN); // PB1 = Hi LED = Off
|
||||
delay_ms(300);
|
||||
}
|
||||
Reference in New Issue
Block a user