for debug

This commit is contained in:
2025-08-14 00:13:49 +08:00
parent 93294b0e3c
commit 54bf206ec3
6 changed files with 161 additions and 4 deletions

View File

@@ -38,6 +38,8 @@ OF SUCH DAMAGE.
#include "led.h"
#include "command.h"
#include <stdio.h>
#include "i2c.h"
#include "board_config.h"
bool g_status_switch = false;
@@ -56,6 +58,7 @@ int main(void)
led_init();
#ifdef DEBUG_VERBOSE
char hello_world[] = {"Hello World!"};
for (uint8_t i = 0; i < sizeof(hello_world); i++)
@@ -65,6 +68,18 @@ int main(void)
}
while (usart_flag_get(RS485_PHY, USART_FLAG_TC) == RESET) {}
#endif
i2c_config();
// i2c_bus_reset();
#ifdef DEBUG_VERBOSE
i2c_scan();
#endif
while(1){
command_process();

View File

@@ -11,7 +11,7 @@
\retval none
*/
void soft_i2c_delay(void) {
delay_us(20); // Adjust delay as needed
delay_10us(2); // Adjust delay as needed
/* delay to freq
* 15KHz: delay_us(20);
* 65KHz: delay_us(1);