add ultrasonic sending interval constant macro definition
This commit is contained in:
		| @@ -13,6 +13,7 @@ | ||||
| #include "ultrasonic_driver.h" | ||||
|  | ||||
| #define ULTRASONIC_CYCLES     0x05U | ||||
| #define ULTRASONIC_TRAN_US    50  // (ms) | ||||
|  | ||||
| /*! | ||||
|     \brief      main function | ||||
| @@ -47,7 +48,7 @@ int main(void) | ||||
|  | ||||
|     while(1) | ||||
|     { | ||||
|         delay_ms(50); | ||||
|         delay_ms(ULTRASONIC_TRAN_US); | ||||
|         ultrasonic_pwm_out_cycles(ULTRASONIC_CYCLES); | ||||
|         // printf("Send ultra sonic driver signal!\r\n"); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user