demo: Use memset(), might be faster.
This commit is contained in:
parent
c03ed39733
commit
5a9660dd4e
|
@ -288,12 +288,10 @@ static void samples_generator(uint8_t *buf, uint64_t size, void *data)
|
||||||
*(buf + i) = i;
|
*(buf + i) = i;
|
||||||
break;
|
break;
|
||||||
case PATTERN_ALL_LOW: /* All probes are low */
|
case PATTERN_ALL_LOW: /* All probes are low */
|
||||||
for (i = 0; i < size; i++)
|
memset(buf, 0x00, size);
|
||||||
*(buf + i) = 0x00;
|
|
||||||
break;
|
break;
|
||||||
case PATTERN_ALL_HIGH: /* All probes are high */
|
case PATTERN_ALL_HIGH: /* All probes are high */
|
||||||
for (i = 0; i < size; i++)
|
memset(buf, 0xff, size);
|
||||||
*(buf + i) = 0xff;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* TODO: Error handling. */
|
/* TODO: Error handling. */
|
||||||
|
|
Loading…
Reference in New Issue