File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/api Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,13 @@ uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address)
102
102
uint32_t devicesize = 0 ;
103
103
uint32_t startaddr = 0 ;
104
104
105
+ #if defined(TARGET_RAPIDIOT )
106
+ startaddr = MBED_ROM_START ;
107
+ devicesize = MBED_ROM_SIZE ;
108
+ #else
105
109
FLASH_GetProperty ((flash_config_t * )& obj -> flash_config , kFLASH_PropertyPflashBlockBaseAddr , & startaddr );
106
110
FLASH_GetProperty ((flash_config_t * )& obj -> flash_config , kFLASH_PropertyPflashTotalSize , & devicesize );
111
+ #endif
107
112
108
113
if ((address >= startaddr ) && (address < (startaddr + devicesize ))) {
109
114
FLASH_GetProperty ((flash_config_t * )& obj -> flash_config , kFLASH_PropertyPflashSectorSize , & sectorsize );
@@ -119,20 +124,28 @@ uint32_t flash_get_page_size(const flash_t *obj)
119
124
120
125
uint32_t flash_get_start_address (const flash_t * obj )
121
126
{
127
+ #if defined(TARGET_RAPIDIOT )
128
+ return MBED_ROM_START ;
129
+ #else
122
130
uint32_t startaddr = 0 ;
123
131
124
132
FLASH_GetProperty ((flash_config_t * )& obj -> flash_config , kFLASH_PropertyPflashBlockBaseAddr , & startaddr );
125
133
126
134
return startaddr ;
135
+ #endif
127
136
}
128
137
129
138
uint32_t flash_get_size (const flash_t * obj )
130
139
{
140
+ #if defined(TARGET_RAPIDIOT )
141
+ return MBED_ROM_SIZE ;
142
+ #else
131
143
uint32_t devicesize = 0 ;
132
144
133
145
FLASH_GetProperty ((flash_config_t * )& obj -> flash_config , kFLASH_PropertyPflashTotalSize , & devicesize );
134
146
135
147
return devicesize ;
148
+ #endif
136
149
}
137
150
138
151
#endif
You can’t perform that action at this time.
0 commit comments