change building process yes, again

This commit is contained in:
hathach
2012-12-07 17:59:46 +07:00
parent cd74f4f0ed
commit 70e3a13951
12 changed files with 1180 additions and 102 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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>

View File

@@ -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())

View File

@@ -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