/* Sets a general-purpose fuse byte with the appropriate erase and write operations.  */
void flashcalw_set_gp_fuse_byte(uint32_t gp_fuse_byte, uint8_t value)
/* Sets a general-purpose fuse byte with the appropriate erase and write operations.  */
void flashcalw_set_gp_fuse_byte(uint32_t gp_fuse_byte, uint8_t value)
{
	uint32_t error_status;
	switch (value) {
	case 0xFF:
		flashcalw_erase_gp_fuse_byte(gp_fuse_byte, false);
		break;
	case 0x00:
		flashcalw_write_gp_fuse_byte(gp_fuse_byte, 0x00);
		break;
	default:
		flashcalw_erase_gp_fuse_byte(gp_fuse_byte, false);
		error_status = flashcalw_error_status;
		flashcalw_write_gp_fuse_byte(gp_fuse_byte, value);
		flashcalw_error_status |= error_status;
		break;
	}
}