PID loop development + move rate control to own source files

This commit is contained in:
Ed Clarke
2018-11-30 10:14:34 +00:00
parent 0b2839c9fc
commit 45d84a2b84
5 changed files with 243 additions and 207 deletions

View File

@@ -38,6 +38,14 @@ static inline unsigned fifo_get_fill_short(volatile mem_fifo_short_t * unsafe fi
}
}
static inline void fifo_init_short(volatile mem_fifo_short_t * unsafe fifo) {
unsafe{
fifo->write_idx = 0;
fifo->read_idx = (fifo->size * 2) / 4;
memset(fifo->data_base_ptr , 0, fifo->size * sizeof(short));
}
}
#pragma unsafe arrays
static inline fifo_ret_t fifo_block_push(volatile mem_fifo_t * unsafe fifo, int data[], unsigned n) {
unsafe{