comparison hw.c @ 27:5c9d2e3d6591

Add flashread/writeblock commands which read/write a block of data to flash with a CRC.
author Daniel O'Connor <darius@dons.net.au>
date Tue, 20 Nov 2012 21:54:06 +1030
parents 1e2fa7396f98
children 435c6330896c
comparison
equal deleted inserted replaced
26:74efdb21ae5d 27:5c9d2e3d6591
41 ENABLE); 41 ENABLE);
42 42
43 RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1 | RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOB | 43 RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1 | RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOB |
44 RCC_APB2Periph_GPIOE | RCC_APB2Periph_SPI1, ENABLE); 44 RCC_APB2Periph_GPIOE | RCC_APB2Periph_SPI1, ENABLE);
45 45
46 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE); 46 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC | RCC_AHBPeriph_CRC, ENABLE);
47 47
48 /* Allow access to BKP Domain */ 48 /* Allow access to BKP Domain */
49 PWR_BackupAccessCmd(ENABLE); 49 PWR_BackupAccessCmd(ENABLE);
50 50
51 /* Reset Backup Domain 51 /* Reset Backup Domain