#include "binarybuffer.h"
-#define DID0_VER(did0) ((did0>>28)&0x07)
+#define DID0_VER(did0) ((did0 >> 28)&0x07)
static int stellaris_register_commands(struct command_context_s *cmd_ctx);
static int stellaris_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
static int stellaris_erase(struct flash_bank_s *bank, int first, int last);
if (DID0_VER(stellaris_info->did0) > 0)
{
- device_class = (stellaris_info->did0>>16) & 0xFF;
+ device_class = (stellaris_info->did0 >> 16) & 0xFF;
}
else
{
device_class,
StellarisClassname[device_class],
stellaris_info->target_name,
- (int)('A' + ((stellaris_info->did0>>8) & 0xFF)),
+ (int)('A' + ((stellaris_info->did0 >> 8) & 0xFF)),
(int)((stellaris_info->did0) & 0xFF));
buf += printed;
buf_size -= printed;
stellaris_info->did1,
stellaris_info->did1,
"ARMV7M",
- (int)((1+((stellaris_info->dc0>>16) & 0xFFFF))/4),
+ (int)((1+((stellaris_info->dc0 >> 16) & 0xFFFF))/4),
(int)((1+(stellaris_info->dc0 & 0xFFFF))*2));
buf += printed;
buf_size -= printed;
LOG_DEBUG("Stellaris PLLCFG %" PRIx32 "", pllcfg);
stellaris_info->rcc = rcc;
- sysdiv = (rcc>>23) & 0xF;
- usesysdiv = (rcc>>22) & 0x1;
- bypass = (rcc>>11) & 0x1;
- oscsrc = (rcc>>4) & 0x3;
- /* xtal = (rcc>>6)&0xF; */
+ sysdiv = (rcc >> 23) & 0xF;
+ usesysdiv = (rcc >> 22) & 0x1;
+ bypass = (rcc >> 11) & 0x1;
+ oscsrc = (rcc >> 4) & 0x3;
+ /* xtal = (rcc >> 6)&0xF; */
switch (oscsrc)
{
case 0:
{
target_read_u32(target, FLASH_FMC, &flash_fmc);
}
- while(flash_fmc & FMC_ERASE);
+ while (flash_fmc & FMC_ERASE);
/* Check acess violations */
target_read_u32(target, FLASH_CRIS, &flash_cris);
{
target_read_u32(target, FLASH_FMC, &flash_fmc);
}
- while(flash_fmc & FMC_COMT);
+ while (flash_fmc & FMC_COMT);
/* Check acess violations */
target_read_u32(target, FLASH_CRIS, &flash_cris);
uint8_t last_word[4] = {0xff, 0xff, 0xff, 0xff};
int i = 0;
- while(bytes_remaining > 0)
+ while (bytes_remaining > 0)
{
last_word[i++] = *(buffer + bytes_written);
bytes_remaining--;