mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Merge pull request #4656 from LMESTM/update_flash_comments
Correct comments in flash api for STM32 L0 targetspull/4636/head
						commit
						9b082fff55
					
				| 
						 | 
					@ -119,16 +119,15 @@ int32_t flash_program_page(flash_t *obj, uint32_t address,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address) {
 | 
					uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address) {
 | 
				
			||||||
    /*  considering 1 sector = 1 page */
 | 
					 | 
				
			||||||
    if ((address >= (FLASH_BASE + FLASH_SIZE)) || (address < FLASH_BASE)) {
 | 
					    if ((address >= (FLASH_BASE + FLASH_SIZE)) || (address < FLASH_BASE)) {
 | 
				
			||||||
        return MBED_FLASH_INVALID_SIZE;
 | 
					        return MBED_FLASH_INVALID_SIZE;
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
 | 
					        /*  sector composed of N pages */
 | 
				
			||||||
        return (NUM_PAGES_IN_SECTOR * FLASH_PAGE_SIZE);
 | 
					        return (NUM_PAGES_IN_SECTOR * FLASH_PAGE_SIZE);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uint32_t flash_get_page_size(const flash_t *obj) {
 | 
					uint32_t flash_get_page_size(const flash_t *obj) {
 | 
				
			||||||
    /*  considering 1 sector = 1 page */
 | 
					 | 
				
			||||||
    return FLASH_PAGE_SIZE;
 | 
					    return FLASH_PAGE_SIZE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue