uC chip interface arduino  0.9.0
A interface for async and neuromrphic IC testing
Loading...
Searching...
No Matches
datatypes.cpp
Go to the documentation of this file.
1/*
2 This file is part of the Firmware project to interface with small Async or Neuromorphic chips
3 Copyright (C) 2022-2023 Ole Richter - University of Groningen
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
17*/
18
19#include "datatypes.h"
20#include "core_ring_buffer.h"
21
22// function to copy packet content from volotile to not volotile
24 packet_t out;
25 uint8_t i = 0;
26 for (i = 0; i < sizeof(packet_t); i++) out.bytes[i] = in->bytes[i];
27 return out;
28}
29
30// function to copy packet content from not volotile to volotile
31void copy_packet(packet_t* in, volatile packet_t* out){
32 uint8_t i = 0;
33 for (i = 0; i < sizeof(packet_t); i++) out->bytes[i] = in->bytes[i];
34}
packet_t copy_packet(volatile packet_t *in)
Definition: datatypes.cpp:23
uint8_t bytes[1+4+4]
Definition: datatypes.h:793