#include "imp.h"
#include "cc3220sf.h"
+#include <helper/binarybuffer.h>
#include <helper/time_support.h>
#include <target/algorithm.h>
#include <target/armv7m.h>
int retval = ERROR_OK;
- if (TARGET_HALTED != target->state) {
+ if (target->state != TARGET_HALTED) {
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
int retval = ERROR_OK;
- if (TARGET_HALTED != target->state) {
+ if (target->state != TARGET_HALTED) {
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
int retval = ERROR_OK;
- if (TARGET_HALTED != target->state) {
+ if (target->state != TARGET_HALTED) {
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
/* Check that the head value was written to flash */
result = buf_get_u32(reg_params[2].value, 0, 32);
- if (0 != result) {
+ if (result != 0) {
retval = ERROR_FAIL;
LOG_ERROR("cc3220sf: Flash operation failed");
}
/* Check that all words were written to flash */
result = buf_get_u32(reg_params[2].value, 0, 32);
- if (0 != result) {
+ if (result != 0) {
retval = ERROR_FAIL;
LOG_ERROR("cc3220sf: Flash operation failed");
break;
}
/* Do one word write for any final bytes less than a full word */
- if ((retval == ERROR_OK) && (0 != tail_count)) {
+ if ((retval == ERROR_OK) && (tail_count != 0)) {
uint8_t tail[4];
/* Set starting byte offset for data to write */
/* Check that the tail was written to flash */
result = buf_get_u32(reg_params[2].value, 0, 32);
- if (0 != result) {
+ if (result != 0) {
retval = ERROR_FAIL;
LOG_ERROR("cc3220sf: Flash operation failed");
}