CCS/bsl/main.c
/**
 * This function is called by WISP FW after a successful write command
 *  reception
 *
 */
This function is called by WISP FW after a successful write command
reception
This function is called by WISP FW after a successful write command reception
void my_writeCallback (void) {
	uint8_t hi = (wispData.writeBufPtr[0] >> 8)  & 0xFF;
	uint8_t lo = (wispData.writeBufPtr[0])  & 0xFF;
	if (hi == 0xB1 && lo == 0x05) {
		(* (uint16_t *) (BSL_PASSWD)) = 0xB105;
	} else if (hi == 0xB0 && lo == 0x07) {
		(* (uint16_t *) (BSL_PASSWD)) = 0xB007;
		PMMCTL0 |= PMMSWPOR;
	}
	wispData.epcBuf[2]  = (wispData.writeBufPtr[0] >> 8)  & 0xFF;
	wispData.epcBuf[3] = (wispData.writeBufPtr[0])  & 0xFF;
}
void my_writeCallback ( void ) { uint8_t hi = ( wispData . writeBufPtr [ 0 ] >> 8 ) & 0xFF ; uint8_t lo = ( wispData . writeBufPtr [ 0 ] ) & 0xFF ; if ( hi == 0xB1 && lo == 0x05 ) { ( * ( uint16_t * ) ( BSL_PASSWD ) ) = 0xB105 ; } else if ( hi == 0xB0 && lo == 0x07 ) { ( * ( uint16_t * ) ( BSL_PASSWD ) ) = 0xB007 ; PMMCTL0 |= PMMSWPOR ; } wispData . epcBuf [ 2 ] = ( wispData . writeBufPtr [ 0 ] >> 8 ) & 0xFF ; wispData . epcBuf [ 3 ] = ( wispData . writeBufPtr [ 0 ] ) & 0xFF ; }
This function is called by WISP FW after a successful write command
  reception
This function is called by WISP FW after a successful write command reception
// Get data descriptor. // Write bootloader password if correct command is given. // POR. // Acknowledge the message.