Rework LED flashing and add Particle's boards
This commit is contained in:
		@@ -235,7 +235,7 @@ void read_block(uint32_t block_no, uint8_t *data) {
 | 
			
		||||
/** uf2 upgrade complete -> inform bootloader to update setting and reset */
 | 
			
		||||
static void uf2_write_complete(uint32_t numBlocks)
 | 
			
		||||
{
 | 
			
		||||
  led_red_blink_fast(false);
 | 
			
		||||
  led_state(STATE_WRITING_FINISHED);
 | 
			
		||||
 | 
			
		||||
  dfu_update_status_t update_status;
 | 
			
		||||
 | 
			
		||||
@@ -285,9 +285,9 @@ int write_block(uint32_t block_no, uint8_t *data, bool quiet/*, WriteState *stat
 | 
			
		||||
        static bool first_write = true;
 | 
			
		||||
        if ( first_write ) {
 | 
			
		||||
          first_write = false;
 | 
			
		||||
          led_red_blink_fast(true);
 | 
			
		||||
          led_state(STATE_WRITING_STARTED);
 | 
			
		||||
        }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
        flash_nrf5x_write(bl->targetAddr, bl->data, bl->payloadSize, true);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -318,4 +318,3 @@ int write_block(uint32_t block_no, uint8_t *data, bool quiet/*, WriteState *stat
 | 
			
		||||
 | 
			
		||||
    return 512;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,17 +1,27 @@
 | 
			
		||||
#include "boards.h"
 | 
			
		||||
 | 
			
		||||
#define UF2_VERSION        "1.00"
 | 
			
		||||
 | 
			
		||||
#ifdef BOARD_PCA10056
 | 
			
		||||
#ifndef PRODUCT_NAME
 | 
			
		||||
  #define PRODUCT_NAME     DIS_MODEL
 | 
			
		||||
#else
 | 
			
		||||
  #define PRODUCT_NAME     "Adafruit " DIS_MODEL
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef BOARD_ID
 | 
			
		||||
#define BOARD_ID           "NRF52-Bluefruit-v0"
 | 
			
		||||
#define INDEX_URL          "https://www.adafruit.com/product/0000"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef INDEX_URL
 | 
			
		||||
#define INDEX_URL          "https://www.adafruit.com/"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define BOOTLOADER_ID      MK_DIS_FIRMWARE
 | 
			
		||||
 | 
			
		||||
#define UF2_NUM_BLOCKS     8000   // at least 4,1 MB for FAT16
 | 
			
		||||
 | 
			
		||||
#ifndef VOLUME_LABEL
 | 
			
		||||
#define VOLUME_LABEL       "NRF52BOOT  "
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define FLASH_SIZE         (USER_FLASH_END-USER_FLASH_START) // Max flash size
 | 
			
		||||
 | 
			
		||||
// Only allow to write application TODO dynamic depending on SD size
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user