change building process yes, again
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@
|
||||
<name>device_keyboard</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>tinyusb</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
@@ -86,4 +87,15 @@
|
||||
<location>C:/Users/hathach/Dropbox/tinyusb/tinyusb/demos/bsp</location>
|
||||
</link>
|
||||
</linkedResources>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1354876380300</id>
|
||||
<name></name>
|
||||
<type>26</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-startup_keil</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <cr_section_macros.h>
|
||||
#include <NXP/crp.h>
|
||||
#include "board.h"
|
||||
#include "boards/board.h"
|
||||
#include "tusb.h"
|
||||
|
||||
// Variable to store CRP value in. Will be placed automatically
|
||||
@@ -12,22 +12,26 @@
|
||||
// See crp.h header for more information
|
||||
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;
|
||||
|
||||
volatile uint32_t system_tick = 0;
|
||||
|
||||
void SysTick_Handler (void)
|
||||
{
|
||||
system_tick++;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
uint32_t currentSecond, lastSecond;
|
||||
currentSecond = lastSecond = 0;
|
||||
uint32_t current_tick = system_tick;
|
||||
|
||||
board_init();
|
||||
tusb_init();
|
||||
|
||||
while (1)
|
||||
{
|
||||
currentSecond = systickGetSecondsActive();
|
||||
if (currentSecond != lastSecond)
|
||||
if (current_tick + 1000 < system_tick)
|
||||
{
|
||||
/* Toggle LED once per second */
|
||||
lastSecond = currentSecond;
|
||||
board_leds(0x01, lastSecond%2);
|
||||
current_tick += 1000;
|
||||
board_leds(0x01, (current_tick/1000)%2); /* Toggle LED once per second */
|
||||
|
||||
#ifndef CFG_CLASS_CDC
|
||||
if (usb_isConfigured())
|
||||
|
||||
@@ -5,6 +5,6 @@ proj_path = $(build_dir)/..
|
||||
#get workspace absolute path
|
||||
workspace_dir = $(shell cd $(proj_path)/../../.. ; pwd)
|
||||
#workspace_dir = $(proj_path)/../../../
|
||||
$(warning workspace $(workspace_dir))
|
||||
#$(warning workspace $(workspace_dir))
|
||||
|
||||
include $(workspace_dir)/demos/demos.mk
|
||||
#include $(workspace_dir)/demos/demos.mk
|
||||
|
||||
Reference in New Issue
Block a user