first commit v2.0.1

This commit is contained in:
hulk
2024-08-08 19:18:16 +08:00
commit f526aa2b8f
159 changed files with 43838 additions and 0 deletions

View 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);
}