/* Set the Number of Wait States. 
Used to match the system clock to the FLASH memory access time. See the programming manual for more information on clock speed ranges. The latency must be changed to the appropriate value  */
void flash_set_ws(uint32_t ws)
/* Set the Number of Wait States. 
Used to match the system clock to the FLASH memory access time. See the programming manual for more information on clock speed ranges. The latency must be changed to the appropriate value  */
void flash_set_ws(uint32_t ws)
{
	uint32_t reg32;
	reg32 = FLASH_ACR;
	reg32 &= ~((1 << 0) | (1 << 1) | (1 << 2));
	reg32 |= ws;
	FLASH_ACR = reg32;
}