Merge branch 'master' into cr1901-msp430f5529

This commit is contained in:
hathach
2019-10-25 21:20:05 +07:00
71 changed files with 1901 additions and 1259 deletions

View File

@@ -42,6 +42,8 @@ enum {
BLINK_UNPRESSED = 1000
};
#define HELLO_STR "Hello from TinyUSB\n"
int main(void)
{
board_init();
@@ -53,9 +55,15 @@ int main(void)
{
uint32_t interval_ms = board_button_read() ? BLINK_PRESSED : BLINK_UNPRESSED;
// uart echo
// uint8_t ch;
// if ( board_uart_read(&ch, 1) ) board_uart_write(&ch, 1);
// Blink every interval ms
if ( !(board_millis() - start_ms < interval_ms) )
{
board_uart_write(HELLO_STR, strlen(HELLO_STR));
start_ms = board_millis();
board_led_write(led_state);