Commit 7c967ca5 by Enrico Pozzobon

small fixes

parent 5fb979ea
......@@ -13,9 +13,10 @@ mv build/f7.bin .
mv build/f7.hex .
mv build/f7.elf .
rm ./Drivers
rm -rf ./Drivers
rm -rf ./build/
exit EXIT_CODE
exit $EXIT_CODE
......@@ -7,7 +7,7 @@
#define CMDBUF_LEN 200
static uint8_t cmdbuf[CMDBUF_LEN];
#define CRYPTO_BUSY PA7
#define CRYPTO_BUSY PB9
#define noInterrupts() eclic_global_interrupt_disable()
#define interrupts() eclic_global_interrupt_disable()
#define yield() do {} while(0)
......@@ -32,8 +32,6 @@ extern "C" {
static void init_uart0(void)
{
// enable GPIO clock
rcu_periph_clock_enable(RCU_GPIOA);
// enable USART0 clock
rcu_periph_clock_enable(RCU_USART0);
// configure USART0
......@@ -79,6 +77,8 @@ void my_assert(bool b) {
}
void setup() {
rcu_periph_clock_enable(RCU_GPIOA);
rcu_periph_clock_enable(RCU_GPIOB);
init_uart0();
pinMode(CRYPTO_BUSY, OUTPUT);
digitalWrite(CRYPTO_BUSY, HIGH);
......
......@@ -260,7 +260,7 @@ class ScheduleJob(Resource):
'cipher', 'cipher_timestamp'
]
for k in mandatory_fields:
if k not in data:
if k not in data or len(k) == 0:
return 'field "%s" expected' % k, 400
schedule.append(ScheduledTest(**data))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment