File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed
Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ ENTRY(_reset)
1212 * the command line using the linker's --defsym option.
1313 */
1414EXTERN (_min_stack_size _min_heap_size)
15- PROVIDE(_min_stack_size = 0x700 ) ;
15+ PROVIDE(_min_stack_size = 0x800 ) ;
1616PROVIDE (_min_heap_size = 0 ) ;
1717INCLUDE nr_procdefs.ld
1818
1919_DATA_ADDR = 0xA0000200 ;
20- _BSS_ADDR = 0xA0000700 ;
20+ _BSS_ADDR = 0xA0000800 ;
2121
2222SECTIONS
2323{
Original file line number Diff line number Diff line change 2828 *******************************************************************/
2929#include "main.h"
3030unsigned char greenLed = 0 ;
31+ uint16_t led_count = 0 ;
3132void BlinkUSBStatus (void )
3233{
33- uint16_t led_count = 0 ;
34-
35- if ( led_count == 0 ) led_count = 10000U ;
34+
35+ if ( led_count == 0 )
36+ led_count = 10000U ;
3637 led_count -- ;
3738
3839 if (led_count == 0 )
@@ -41,6 +42,4 @@ void BlinkUSBStatus(void)
4142 setLed (!greenLed ,greenLed ,!greenLed );
4243 }//end if
4344
44-
45-
4645}//end BlinkUSBStatus
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ BowlerPacket BootloaderPacket;
2323//#define initButton() (_TRISB0)=1;
2424
2525int main (void ) {
26- InitLEDS ();
26+
2727 SetColor (1 , 1 , 1 );
2828 initButton ();
2929 int timeout = 0 ;
@@ -51,10 +51,11 @@ int main(void) {
5151
5252 println_I ("Stack initialized" );
5353 while (1 ) {
54- BlinkUSBStatus ();
54+
5555 if (getVendorCode () != 0x1E ) {
5656 SetColor (1 , 0 , 0 );
57- }
57+ }else
58+ BlinkUSBStatus ();
5859 Bowler_Server (& BootloaderPacket , true);
5960 if ((isPressed () || getBootloaderResetFlag ())) {
6061 println_E ("Rebooting " ); p_int_E (isPressed ());print_E (", " );p_int_E (getBootloaderResetFlag ());
@@ -69,7 +70,7 @@ uint8_t avrID[7];
6970void InitializeSystem (void ) {
7071 Bowler_Init ();
7172 EnableDebugTerminal ();
72- setPrintLevelInfoPrint ();
73+ setPrintLevelWarningPrint ();
7374 clearPrint ();
7475
7576#if !defined(MAJOR_REV )
@@ -111,7 +112,7 @@ void InitializeSystem(void) {
111112 InitSPI ();
112113
113114
114- SetColor (1 , 0 , 1 );
115+ SetColor (1 , 1 , 1 );
115116 programMode ();
116117 writeLowFuse ();
117118 writeHighFuse ();
@@ -122,6 +123,7 @@ void InitializeSystem(void) {
122123 DelayMs (10 );
123124 HoldAVRReset ();
124125 GetAVRid (avrID );
126+
125127#else
126128#error No Bootloader type defined
127129#endif
You can’t perform that action at this time.
0 commit comments