return ERROR_FAIL;
}
LOG_DEBUG("poll_value = 0x%04" PRIx32 "", poll_value);
- }while(!(poll_value & 0x0200));
+ }while (!(poll_value & 0x0200));
return ERROR_OK;
}
return ERROR_FAIL;
}
LOG_DEBUG("poll_value = 0x%04" PRIx32 "", poll_value);
- }while(!(poll_value & 0x0200));
+ }while (!(poll_value & 0x0200));
return ERROR_OK;
}
}
cur_size = 0;
- while(count > 0)
+ while (count > 0)
{
if (count > page_size)
{
target_free_working_area(target, source);
- while(count > 0)
+ while (count > 0)
{
uint32_t value;
memcpy(&value, buffer, sizeof(uint32_t));
{
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--;
uint8_t last_dword[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
int i = 0;
- while(bytes_remaining > 0)
+ while (bytes_remaining > 0)
{
last_dword[i++] = *(buffer + bytes_written);
bytes_remaining--;
uint8_t last_halfword[2] = {0xff, 0xff};
int i = 0;
- while(bytes_remaining > 0)
+ while (bytes_remaining > 0)
{
last_halfword[i++] = *(buffer + bytes_written);
bytes_remaining--;
jtag_add_dr_scan(1, &field, jtag_get_end_state());
jtag_execute_queue();
- } while(!(status & ISC_STATUS_BUSY));
+ } while (!(status & ISC_STATUS_BUSY));
str9xpec_isc_disable(bank);
status = buf_get_u32(scanbuf, 0, 8);
- } while(!(status & ISC_STATUS_BUSY));
+ } while (!(status & ISC_STATUS_BUSY));
if ((status & ISC_STATUS_ERROR) != STR9XPEC_ISC_SUCCESS)
return ERROR_FLASH_OPERATION_FAILED;
uint8_t last_dword[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
int i = 0;
- while(bytes_remaining > 0)
+ while (bytes_remaining > 0)
{
last_dword[i++] = *(buffer + bytes_written);
bytes_remaining--;
status = buf_get_u32(scanbuf, 0, 8);
- } while(!(status & ISC_STATUS_BUSY));
+ } while (!(status & ISC_STATUS_BUSY));
if ((status & ISC_STATUS_ERROR) != STR9XPEC_ISC_SUCCESS)
return ERROR_FLASH_OPERATION_FAILED;
jtag_add_dr_scan(1, &field, jtag_get_end_state());
jtag_execute_queue();
- } while(!(status & ISC_STATUS_BUSY));
+ } while (!(status & ISC_STATUS_BUSY));
str9xpec_isc_disable(bank);
if (context == NULL)
return ERROR_OK;
- while(NULL != context->commands)
+ while (NULL != context->commands)
{
c = context->commands;
- while(NULL != c->children)
+ while (NULL != c->children)
{
c2 = c->children;
c->children = c->children->next;
/* find command */
c = context->commands;
- while(NULL != c)
+ while (NULL != c)
{
if (strcmp(name, c->name) == 0)
{
}
/* unregister children */
- while(NULL != c->children)
+ while (NULL != c->children)
{
c2 = c->children;
c->children = c->children->next;
Jim_EventLoop *eventLoop = Jim_GetAssocData(interp, "eventloop");
fe = eventLoop->fileEventHead;
- while(fe) {
+ while (fe) {
if (fe->handle == handle) {
if (prev == NULL)
eventLoop->fileEventHead = fe->next;
te = eventLoop->timeEventHead;
if (id >= eventLoop->timeEventNextId)
return -2; /* wrong event ID */
- while(te) {
+ while (te) {
if (te->id == id) {
remain = (te->when_sec - cur_sec) * 1000;
remain += (te->when_ms - cur_ms) ;
Jim_TimeEvent *te = eventLoop->timeEventHead;
Jim_TimeEvent *nearest = NULL;
- while(te) {
+ while (te) {
if (!nearest || te->when_sec < nearest->when_sec ||
(te->when_sec == nearest->when_sec &&
te->when_ms < nearest->when_ms))
}
} else if (retval > 0) {
fe = eventLoop->fileEventHead;
- while(fe != NULL) {
+ while (fe != NULL) {
int fd = fileno((FILE*)fe->handle);
// fprintf(stderr,"fd: %d mask: %02x \n",fd,fe->mask);
/* Check time events */
te = eventLoop->timeEventHead;
maxId = eventLoop->timeEventNextId-1;
- while(te) {
+ while (te) {
long now_sec, now_ms;
jim_wide id;
Jim_EventLoop *eventLoop = data;
fe = eventLoop->fileEventHead;
- while(fe) {
+ while (fe) {
next = fe->next;
if (fe->finalizerProc)
fe->finalizerProc(interp, fe->clientData);
}
te = eventLoop->timeEventHead;
- while(te) {
+ while (te) {
next = te->next;
if (te->finalizerProc)
te->finalizerProc(interp, te->clientData);
static int JimStringMatch(const char *pattern, int patternLen,
const char *string, int stringLen, int nocase)
{
- while(patternLen) {
+ while (patternLen) {
switch(pattern[0]) {
case '*':
while (pattern[1] == '*') {
}
if (patternLen == 1)
return 1; /* match */
- while(stringLen) {
+ while (stringLen) {
if (JimStringMatch(pattern+1, patternLen-1,
string, stringLen, nocase))
return 1; /* match */
patternLen--;
}
match = 0;
- while(1) {
+ while (1) {
if (pattern[0] == '\\') {
pattern++;
patternLen--;
pattern++;
patternLen--;
if (stringLen == 0) {
- while(*pattern == '*') {
+ while (*pattern == '*') {
pattern++;
patternLen--;
}
unsigned char *u1 = (unsigned char*) s1, *u2 = (unsigned char*) s2;
if (nocase == 0) {
- while(l1 && l2) {
+ while (l1 && l2) {
if (*u1 != *u2)
return (int)*u1-*u2;
u1++; u2++; l1--; l2--;
if (!l1 && !l2) return 0;
return l1-l2;
} else {
- while(l1 && l2) {
+ while (l1 && l2) {
if (tolower((int)*u1) != tolower((int)*u2))
return tolower((int)*u1)-tolower((int)*u2);
u1++; u2++; l1--; l2--;
if ((str[0] == '\0') || (str == endptr) )
return JIM_ERR;
if (endptr[0] != '\0') {
- while(*endptr) {
+ while (*endptr) {
if (!isspace((int)*endptr))
return JIM_ERR;
endptr++;
if ( (str[0] == '\0') || (str == endptr) )
return JIM_ERR;
if (endptr[0] != '\0') {
- while(*endptr) {
+ while (*endptr) {
if (!isspace((int)*endptr))
return JIM_ERR;
endptr++;
len = sprintf(buf, "%.17g", doubleValue);
s = buf;
- while(*s) {
+ while (*s) {
if (*s == '.') return len;
s++;
}
unsigned int Jim_GenHashFunction(const unsigned char *buf, int len)
{
unsigned int h = 0;
- while(len--)
+ while (len--)
h += (h<<3)+*buf++;
return h;
}
/* For each hash entry on this slot... */
he = ht->table[i];
- while(he) {
+ while (he) {
unsigned int h;
nextHe = he->next;
he = ht->table[h];
prevHe = NULL;
- while(he) {
+ while (he) {
if (Jim_CompareHashKeys(ht, key, he->key)) {
/* Unlink the element from the list */
if (prevHe)
Jim_HashEntry *he, *nextHe;
if ((he = ht->table[i]) == NULL) continue;
- while(he) {
+ while (he) {
nextHe = he->next;
Jim_FreeEntryKey(ht, he);
Jim_FreeEntryVal(ht, he);
if (ht->size == 0) return NULL;
h = Jim_HashKey(ht, key) & ht->sizemask;
he = ht->table[h];
- while(he) {
+ while (he) {
if (Jim_CompareHashKeys(ht, key, he->key))
return he;
he = he->next;
if (size >= 2147483648U)
return 2147483648U;
- while(1) {
+ while (1) {
if (i >= size)
return i;
i *= 2;
h = Jim_HashKey(ht, key) & ht->sizemask;
/* Search if this slot does not already contain the given key */
he = ht->table[h];
- while(he) {
+ while (he) {
if (Jim_CompareHashKeys(ht, key, he->key))
return -1;
he = he->next;
int JimParseScript(struct JimParserCtx *pc)
{
- while(1) { /* the while is used to reiterate with continue if needed */
+ while (1) { /* the while is used to reiterate with continue if needed */
if (!pc->len) {
pc->tstart = pc->p;
pc->tend = pc->p-1;
int level = 0;
int state = ' ';
- while(len) {
+ while (len) {
switch (*s) {
case '\\':
if (len > 1)
case '8':
case '9':
accum = 0;
- while( isdigit(*fmt) && (fmtLen > 0) ){
+ while ( isdigit(*fmt) && (fmtLen > 0) ){
accum = (accum * 10) + (*fmt - '0');
fmt++; fmtLen--;
}
}
JimParserInit(&parser, scriptText, scriptTextLen, initialLineNumber);
- while(!JimParserEof(&parser)) {
+ while (!JimParserEof(&parser)) {
char *token;
int len, type, linenr;
Jim_Obj *objPtr = targetNameObjPtr;
Jim_Var *varPtr;
/* Cycles are only possible with 'uplevel 0' */
- while(1) {
+ while (1) {
if (Jim_StringEqObj(objPtr, nameObjPtr, 0)) {
Jim_SetResultString(interp,
"can't upvar from variable to itself", -1);
* is of a type that can contain references. */
Jim_InitHashTable(&marks, &JimRefMarkHashTableType, NULL);
objPtr = interp->liveList;
- while(objPtr) {
+ while (objPtr) {
if (objPtr->typePtr == NULL ||
objPtr->typePtr->flags & JIM_TYPE_REFERENCES) {
const char *str, *p;
continue;
}
/* Extract references from the object string repr. */
- while(1) {
+ while (1) {
int i;
jim_wide id;
char buf[21];
Jim_FreeHashTable(&i->packages);
Jim_Free(i->prngState);
/* Free the call frames list */
- while(cf) {
+ while (cf) {
prevcf = cf->parentCallFrame;
JimFreeCallFrame(i, cf, JIM_FCF_NONE);
cf = prevcf;
Jim_fprintf( i, i->cookie_stdout,JIM_NL "-------------------------------------" JIM_NL);
Jim_fprintf( i, i->cookie_stdout,"Objects still in the free list:" JIM_NL);
- while(objPtr) {
+ while (objPtr) {
const char *type = objPtr->typePtr ?
objPtr->typePtr->name : "";
Jim_fprintf( i, i->cookie_stdout,"%p \"%-10s\": '%.20s' (refCount: %d)" JIM_NL,
}
/* Free cached CallFrame structures */
cf = i->freeFramesList;
- while(cf) {
+ while (cf) {
nextcf = cf->nextFramePtr;
if (cf->vars.table != NULL)
Jim_Free(cf->vars.table);
char *q = Jim_Alloc(len*2+1), *p;
p = q;
- while(*s) {
+ while (*s) {
switch (*s) {
case ' ':
case '$':
/* Convert into a list */
JimParserInit(&parser, str, strLen, 1);
- while(!JimParserEof(&parser)) {
+ while (!JimParserEof(&parser)) {
char *token;
int tokenLen, type;
Jim_Obj *elementPtr;
/* Convert into a dict */
JimParserInit(&parser, str, strLen, 1);
i = 0;
- while(!JimParserEof(&parser)) {
+ while (!JimParserEof(&parser)) {
char *token;
int tokenLen, type;
int JimParseExpression(struct JimParserCtx *pc)
{
/* Discard spaces and quoted newline */
- while(*(pc->p) == ' ' ||
+ while (*(pc->p) == ' ' ||
*(pc->p) == '\t' ||
*(pc->p) == '\r' ||
*(pc->p) == '\n' ||
/* Search for the end of the first operator */
leftindex = index-1;
arity = 1;
- while(arity) {
+ while (arity) {
switch(expr->opcode[leftindex]) {
case JIM_EXPROP_NUMBER:
case JIM_EXPROP_COMMAND:
Jim_InitStack(&stack);
JimParserInit(&parser, exprText, exprTextLen, 1);
- while(!JimParserEof(&parser)) {
+ while (!JimParserEof(&parser)) {
char *token;
int len, type;
break;
case JIM_TT_EXPR_OPERATOR:
op = JimExprOperatorInfo(token);
- while(1) {
+ while (1) {
Jim_ExprOperator *stackTopOp;
if (Jim_StackPeek(&stack) != NULL) {
case JIM_TT_SUBEXPR_END:
{
int found = 0;
- while(Jim_StackLen(&stack)) {
+ while (Jim_StackLen(&stack)) {
char *opstr = Jim_StackPop(&stack);
if (!strcmp(opstr, "(")) {
Jim_Free(opstr);
script->fileName = NULL;
JimParserInit(&parser, scriptText, scriptTextLen, 1);
- while(1) {
+ while (1) {
char *token;
int len, type, linenr;
}
str = Jim_GetString(objPtr, &strLen);
/* Map it */
- while(strLen) {
+ while (strLen) {
for (i = 0; i < numMaps; i++) {
if (strLen >= keyLen[i] && keyLen[i]) {
if (!JimStringCompare(str, keyLen[i], key[i], keyLen[i],
return JIM_ERR;
}
i = argc-2;
- while(i--) {
+ while (i--) {
if (Jim_CompareStringImmediate(interp, argv[i+1],
"-nobackslashes"))
flags |= JIM_SUBST_NOESC;
{
int i = 0;
- while(Jim_CoreCommandsTable[i].name != NULL) {
+ while (Jim_CoreCommandsTable[i].name != NULL) {
Jim_CreateCommand(interp,
Jim_CoreCommandsTable[i].name,
Jim_CoreCommandsTable[i].cmdProc,
Jim_fflush( interp, interp->cookie_stdout);
scriptObjPtr = Jim_NewStringObj(interp, "", 0);
Jim_IncrRefCount(scriptObjPtr);
- while(1) {
+ while (1) {
const char *str;
char state;
int len;
Jim_Nvp *
Jim_Nvp_name2value_simple( const Jim_Nvp *p, const char *name )
{
- while( p->name ){
+ while ( p->name ){
if ( 0 == strcmp( name, p->name ) ){
break;
}
Jim_Nvp *
Jim_Nvp_name2value_nocase_simple( const Jim_Nvp *p, const char *name )
{
- while( p->name ){
+ while ( p->name ){
if ( 0 == strcasecmp( name, p->name ) ){
break;
}
Jim_Nvp *
Jim_Nvp_value2name_simple( const Jim_Nvp *p, int value )
{
- while( p->name ){
+ while ( p->name ){
if ( value == p->value ){
break;
}
"Unknown param: %s, try one of: ",
Jim_GetString( param_value, NULL ) );
}
- while( nvp->name ){
+ while ( nvp->name ){
const char *a;
const char *b;
entry->val = (ht)->type->valDup((ht)->privdata, _val_); \
else \
entry->val = (_val_); \
-} while(0)
+} while (0)
#define Jim_FreeEntryKey(ht, entry) \
if ((ht)->type->keyDestructor) \
entry->key = (ht)->type->keyDup((ht)->privdata, _key_); \
else \
entry->key = (_key_); \
-} while(0)
+} while (0)
#define Jim_CompareHashKeys(ht, key1, key2) \
(((ht)->type->keyCompare) ? \
Jim_IncrRefCount(_resultObjPtr_); \
Jim_DecrRefCount(i,(i)->result); \
(i)->result = _resultObjPtr_; \
-} while(0)
+} while (0)
/* Reference structure. The interpreter pointer is held within privdata member in HashTable */
#define JIM_REFERENCE_TAGLEN 7 /* The tag is fixed-length, because the reference
*
* Jim_GetOpt_Setup( &goi, interp, argc, argv );
*
- * while( goi.argc ){
+ * while ( goi.argc ){
* e = Jim_GetOpt_Nvp( &goi, nvp_options, &n );
* if ( e != JIM_OK ){
* Jim_GetOpt_NvpUnknown( &goi, nvp_options, 0 );
* Example:
* \code
*
- * while( goi.argc ){
+ * while ( goi.argc ){
* // Get the next option
* e = Jim_GetOpt_Nvp( &goi, cmd_options, &n );
* if ( e != JIM_OK ){
{
jtag_tap_t *t = jtag_all_taps();
unsigned n = 0;
- while(t)
+ while (t)
{
if (t->enabled)
n++;
t->abs_chain_position = jtag_num_taps++;
jtag_tap_t **tap = &__jtag_all_taps;
- while(*tap != NULL)
+ while (*tap != NULL)
tap = &(*tap)->next_tap;
*tap = t;
}
#ifdef _DEBUG_JTAG_IO_
#define JTAG_DEBUG_STATE_APPEND(buf, len, bit) \
- do { buf[len] = bit ? '1' : '0'; } while(0)
+ do { buf[len] = bit ? '1' : '0'; } while (0)
#define JTAG_DEBUG_STATE_PRINT(a, b, astr, bstr) \
DEBUG_JTAG_IO("TAP/SM: %9s -> %5s\tTMS: %s\tTDI: %s", \
tap_state_name(a), tap_state_name(b), astr, bstr)
usb_buffer_p = usb_buffer;
va_start(ap, length);
- while(length > 0) {
+ while (length > 0) {
*usb_buffer_p++ = va_arg(ap, int);
length--;
}
remain = length;
count = 0;
- while(remain) {
+ while (remain) {
if (remain > sizeof(usb_buffer)) {
length = sizeof(usb_buffer);
} else {
remain = length;
count = 0;
- while(remain) {
+ while (remain) {
if (remain > (sizeof(usb_buffer) - 4)) {
length = (sizeof(usb_buffer) - 4);
} else {
buffer_p = buffer;
va_start(ap, length);
- while(remain > 0) {
+ while (remain > 0) {
*buffer_p++ = va_arg(ap, int);
remain--;
}
);
if (usb_err < 0) return(usb_err);
- while(length) {
+ while (length) {
if (length < sizeof(*header)) {
LOG_ERROR("Malformed DTC image\n");
exit(1);
x = 0;
dtc_mask = 1 << (extra_bits - 1);
- while(extra_bits--) {
+ while (extra_bits--) {
if (*tdi_p & tdi_mask) {
x |= dtc_mask;
}
}
/* Loop scheduling full bytes into the DTC command buffer */
- while(byte_bits) {
+ while (byte_bits) {
if (type == SCAN_IN) {
/* make sure there's room for stop and byte op */
x = (dtc_queue.cmd_index >= sizeof(dtc_queue.cmd_buffer) - (1 + 1));
x = 0;
dtc_mask = 1 << (8 - 1);
- while(chunk_bits--) {
+ while (chunk_bits--) {
if (*tdi_p & tdi_mask) {
x |= dtc_mask;
}
x = 0;
dtc_mask = 1 << (8 - 1);
- while(extra_bits--) {
+ while (extra_bits--) {
if (*tdi_p & tdi_mask) {
x |= dtc_mask;
}
LOG_DEBUG("interface claimed!\n");
break;
}
- } while(--retries);
+ } while (--retries);
if (!i)
{
success=1;
}
}
- } while(0);
+ } while (0);
}
}
}
/* clear them as we find them */
reqbits = (NTREQ_IRLEN | NTREQ_IRCAPTURE | NTREQ_IRMASK);
- while( goi->argc ){
+ while ( goi->argc ){
e = Jim_GetOpt_Nvp( goi, opts, &n );
if ( e != JIM_OK ){
Jim_GetOpt_NvpUnknown( goi, opts, 0 );
break;
}
} /* switch(n->value) */
- } /* while( goi->argc ) */
+ } /* while ( goi->argc ) */
/* default is enabled-after-reset */
pTap->enabled = !pTap->disabled_after_reset;
command_print(cmd_ctx, " TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr ");
command_print(cmd_ctx, "---|--------------------|---------|------------|------------|------|------|------|---------");
- while( tap ){
+ while ( tap ){
uint32_t expected, expected_mask, cur_instr, ii;
expected = buf_get_u32(tap->expected, 0, tap->ir_length);
expected_mask = buf_get_u32(tap->expected_mask, 0, tap->ir_length);
connection_t *c;
/* find connection */
- while((c = *p))
+ while ((c = *p))
{
if (c->fd == connection->fd)
{
service_t *c;
/* find service */
- while((c = *p))
+ while ((c = *p))
{
if (c->port == port)
{
service_t *c = services;
/* loop service */
- while(c)
+ while (c)
{
service_t *next = c->next;
tv.tv_sec = 0;
tv.tv_usec = 10000;
- while(!shutdown_openocd)
+ while (!shutdown_openocd)
{
/* monitor sockets for acitvity */
fd_max = 0;
#if 0
#define JTAG_DEBUG(expr ...) DEBUG(expr)
#else
-#define JTAG_DEBUG(expr ...) do {} while(0)
+#define JTAG_DEBUG(expr ...) do {} while (0)
#endif
/*
if (breakpoint->type == BKPT_HARD)
{
- while(comparator_list[fp_num].used && (fp_num < cortex_m3->fp_num_code))
+ while (comparator_list[fp_num].used && (fp_num < cortex_m3->fp_num_code))
fp_num++;
if (fp_num >= cortex_m3->fp_num_code)
{
if (watchpoint->mask == 0xffffffffu)
{
- while(comparator_list[dwt_num].used && (dwt_num < cortex_m3->dwt_num_comp))
+ while (comparator_list[dwt_num].used && (dwt_num < cortex_m3->dwt_num_comp))
dwt_num++;
if (dwt_num >= cortex_m3->dwt_num_comp)
{
do {
ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl;
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
- } while(ejtag_ctrl & EJTAG_CTRL_DSTRT);
+ } while (ejtag_ctrl & EJTAG_CTRL_DSTRT);
/* Read Data */
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_DATA, NULL);
do {
ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl;
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
- } while(ejtag_ctrl & EJTAG_CTRL_DSTRT);
+ } while (ejtag_ctrl & EJTAG_CTRL_DSTRT);
/* Read Data */
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_DATA, NULL);
do {
ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl;
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
- } while(ejtag_ctrl & EJTAG_CTRL_DSTRT);
+ } while (ejtag_ctrl & EJTAG_CTRL_DSTRT);
/* Read Data */
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_DATA, NULL);
do {
ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl;
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
- } while(ejtag_ctrl & EJTAG_CTRL_DSTRT);
+ } while (ejtag_ctrl & EJTAG_CTRL_DSTRT);
/* Clear DMA & Check DERR */
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL);
do {
ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl;
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
- } while(ejtag_ctrl & EJTAG_CTRL_DSTRT);
+ } while (ejtag_ctrl & EJTAG_CTRL_DSTRT);
/* Clear DMA & Check DERR */
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL);
do {
ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl;
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
- } while(ejtag_ctrl & EJTAG_CTRL_DSTRT);
+ } while (ejtag_ctrl & EJTAG_CTRL_DSTRT);
/* Clear DMA & Check DERR */
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL);
{
int bp_num = 0;
- while(comparator_list[bp_num].used && (bp_num < mips32->num_inst_bpoints))
+ while (comparator_list[bp_num].used && (bp_num < mips32->num_inst_bpoints))
bp_num++;
if (bp_num >= mips32->num_inst_bpoints)
{
x = -1;
t = all_targets;
- while( t ){
+ while ( t ){
if ( x < t->target_number ){
x = (t->target_number)+1;
}
/* number is 0 based */
x = -1;
t = all_targets;
- while(t){
+ while (t){
if ( x < t->target_number ){
x = t->target_number;
}
reg_cache_t *cache = target->reg_cache;
count = 0;
- while(cache)
+ while (cache)
{
int i;
for (i = 0; i < cache->num_regs; i++)
reg_cache_t *cache = target->reg_cache;
count = 0;
- while(cache)
+ while (cache)
{
int i;
for (i = 0; i < cache->num_regs; i++)
teap = target->event_action;
done = 0;
- while( teap ){
+ while ( teap ){
if ( teap->event == e ){
done = 1;
LOG_DEBUG( "target: (%d) %s (%s) event: %d (%s) action: %s\n",
int e;
/* parse config or cget options ... */
- while( goi->argc > 0 ){
+ while ( goi->argc > 0 ){
Jim_SetEmptyResult( goi->interp );
/* Jim_GetOpt_Debug( goi ); */
teap = target->event_action;
/* replace existing? */
- while( teap ){
+ while ( teap ){
if ( teap->event == (enum target_event)n->value ){
break;
}
/* loop for more e*/
break;
}
- } /* while( goi->argc ) */
+ } /* while ( goi->argc ) */
/* done - we return */
/* convert to "bytes" */
c = c * b;
/* count is now in 'BYTES' */
- while( c > 0 ){
+ while ( c > 0 ){
y = c;
if ( y > 16 ){
y = 16;
}
}
/* space pad */
- while( x < 16 ){
+ while ( x < 16 ){
target_buf[x] = ' ';
x++;
}
target->cmd_name );
command_print( cmd_ctx, "%-25s | Body", "Event");
command_print( cmd_ctx, "------------------------- | ----------------------------------------");
- while( teap ){
+ while ( teap ){
command_print( cmd_ctx,
"%-25s | %s",
Jim_Nvp_value2name_simple( nvp_target_event, teap->event )->name,
{
target_t **tpp;
tpp = &(all_targets);
- while( *tpp ){
+ while ( *tpp ){
tpp = &( (*tpp)->next );
}
*tpp = target;
}
Jim_SetResult( goi.interp, Jim_NewListObj( goi.interp, NULL, 0 ) );
target = all_targets;
- while( target ){
+ while ( target ){
Jim_ListAppendElement( goi.interp,
Jim_GetResult(goi.interp),
Jim_NewStringObj( goi.interp, target->cmd_name, -1 ) );
LOG_USER("xsvf processing file: \"%s\"", filename);
- while( read(xsvf_fd, &opcode, 1) > 0 )
+ while ( read(xsvf_fd, &opcode, 1) > 0 )
{
/* record the position of the just read opcode within the file */
file_offset = lseek(xsvf_fd, 0, SEEK_CUR) - 1;
mPORTDClearBits(BIT_2);
mPORTDSetPinsDigitalOut(BIT_2);
- while(1)
+ while (1)
{
for(i = 0; i < 500000; i++)
mPORTDToggleBits(BIT_0);
void exit(int exit_code)
{
- while(1);
+ while (1);
} /* EXIT */
atexit()
{
- while(1);
+ while (1);
} /* ATEXIT */
{
volatile unsigned char *led = ((volatile unsigned char *)0xB6020000);
- while(1)
+ while (1)
{
*led = 0xFF;
delay();
void exit(int exit_code)
{
- while(1);
+ while (1);
} /* EXIT */
atexit()
{
- while(1);
+ while (1);
} /* ATEXIT */