diff options
| author | Votre Nom <git-account@loicguegan.fr> | 2017-08-30 10:48:11 +0400 |
|---|---|---|
| committer | Votre Nom <git-account@loicguegan.fr> | 2017-08-30 10:48:11 +0400 |
| commit | f37f200792444fee2f74e807acfd5be7c9180cd7 (patch) | |
| tree | 135975e83d27a144d56f27e1ee4dc6fe0fe91af0 /GEOLOC/app/frame.c | |
Init repo
Diffstat (limited to 'GEOLOC/app/frame.c')
| -rw-r--r-- | GEOLOC/app/frame.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/GEOLOC/app/frame.c b/GEOLOC/app/frame.c new file mode 100644 index 0000000..1908075 --- /dev/null +++ b/GEOLOC/app/frame.c @@ -0,0 +1,22 @@ +#include "frame.h" + + +void pushFrame(Frame frame){ + writeReg(REG_FIFO, frame.id); + writeReg(REG_FIFO, frame.stamp); + int i; + for(i=0;i<FRAME_DATA_SIZE;i++){ + writeReg(REG_FIFO,frame.data[i]); + } +} + +Frame pullFrame(){ + Frame frame; + frame.id=readReg(REG_FIFO); + frame.stamp=readReg(REG_FIFO); + int i; + for(i=0;i<FRAME_DATA_SIZE;i++){ + frame.data[i]=readReg(REG_FIFO); + } + return(frame); +} |
