diff options
| author | J08nY | 2020-03-02 00:03:57 +0100 |
|---|---|---|
| committer | J08nY | 2020-03-02 00:03:57 +0100 |
| commit | b3e45bf773cec6ecf3f2a702c0b48c9dbfab0c04 (patch) | |
| tree | 8a232cf9298772e88bfee7f39b973f0e9009cae3 /pyecsca/codegen/simpleserial | |
| parent | 0341d359dc67ced3f1e65d1d11af3590c1f0992f (diff) | |
| download | pyecsca-codegen-b3e45bf773cec6ecf3f2a702c0b48c9dbfab0c04.tar.gz pyecsca-codegen-b3e45bf773cec6ecf3f2a702c0b48c9dbfab0c04.tar.zst pyecsca-codegen-b3e45bf773cec6ecf3f2a702c0b48c9dbfab0c04.zip | |
Add reduction functions, add global trigger for whole cmd.
Diffstat (limited to 'pyecsca/codegen/simpleserial')
| -rw-r--r-- | pyecsca/codegen/simpleserial/simpleserial.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/pyecsca/codegen/simpleserial/simpleserial.c b/pyecsca/codegen/simpleserial/simpleserial.c index 4e0f0b3..30cd527 100644 --- a/pyecsca/codegen/simpleserial/simpleserial.c +++ b/pyecsca/codegen/simpleserial/simpleserial.c @@ -120,21 +120,6 @@ int simpleserial_get(void) ascii_buf[i] = c; } -// uint8_t ik[4]; -// ik[3] = (uint8_t) i & 0xff; -// ik[2] = (uint8_t) (i>>8) & 0xff; -// ik[1] = (uint8_t) (i>>16) & 0xff; -// ik[0] = (uint8_t) (i>>24) & 0xff; -// uint8_t ic[4]; -// ic[3] = (uint8_t) c & 0xff; -// ic[2] = (uint8_t) (c>>8) & 0xff; -// ic[1] = (uint8_t) (c>>16) & 0xff; -// ic[0] = (uint8_t) (c>>24) & 0xff; -// if (commands[cmd].c == 'd') { -// simpleserial_put('o', 4, ik); -// simpleserial_put('c', 4, ic); -// } - // ASCII buffer is full: convert to bytes // Check for illegal characters here @@ -143,7 +128,9 @@ int simpleserial_get(void) // Callback uint8_t ret[1]; + trigger_high(); ret[0] = commands[cmd].fp(data_buf, i/2); + trigger_low(); simpleserial_put('z', 1, ret); return 1; |
