flash/nor: Use proper data types in driver API
Use 'unsigned int' and 'bool' instead of 'int' where appropriate. While at it, fix some coding style issues. No new Clang analyzer warnings. Change-Id: I700802c9ee81c3c7ae73108f0f8f06b15a4345f8 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/4929 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#ifndef OPENOCD_FLASH_NOR_IMP_H
|
||||
#define OPENOCD_FLASH_NOR_IMP_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/* this is an internal header */
|
||||
#include "core.h"
|
||||
#include "driver.h"
|
||||
@@ -35,8 +37,10 @@ void flash_bank_add(struct flash_bank *bank);
|
||||
*/
|
||||
struct flash_bank *flash_bank_list(void);
|
||||
|
||||
int flash_driver_erase(struct flash_bank *bank, int first, int last);
|
||||
int flash_driver_protect(struct flash_bank *bank, int set, int first, int last);
|
||||
int flash_driver_erase(struct flash_bank *bank, unsigned int first,
|
||||
unsigned int last);
|
||||
int flash_driver_protect(struct flash_bank *bank, int set, unsigned int first,
|
||||
unsigned int last);
|
||||
int flash_driver_write(struct flash_bank *bank,
|
||||
uint8_t *buffer, uint32_t offset, uint32_t count);
|
||||
int flash_driver_read(struct flash_bank *bank,
|
||||
@@ -44,6 +48,6 @@ int flash_driver_read(struct flash_bank *bank,
|
||||
|
||||
/* write (optional verify) an image to flash memory of the given target */
|
||||
int flash_write_unlock(struct target *target, struct image *image,
|
||||
uint32_t *written, int erase, bool unlock);
|
||||
uint32_t *written, bool erase, bool unlock);
|
||||
|
||||
#endif /* OPENOCD_FLASH_NOR_IMP_H */
|
||||
|
||||
Reference in New Issue
Block a user