テスト用のあれこれ共用フォルダ
Revision | 5de0e6111074f4882c51225d5245a1956cbff670 (tree) |
---|---|
Time | 2018-02-27 07:15:45 |
Author | takemasa <suikan@user...> |
Commiter | takemasa |
Added basefifo
@@ -12,8 +12,8 @@ | ||
12 | 12 | <targetDefinitions> |
13 | 13 | <board id="nucleo-f746zg"> |
14 | 14 | <name>NUCLEO-F746ZG</name> |
15 | - <dbgIF>JTAG</dbgIF> | |
16 | 15 | <dbgIF>SWD</dbgIF> |
16 | + <dbgIF>JTAG</dbgIF> | |
17 | 17 | <dbgDEV>ST-Link</dbgDEV> |
18 | 18 | <mcuId>stm32f746zgtx</mcuId> |
19 | 19 | </board> |
@@ -0,0 +1,23 @@ | ||
1 | +/* | |
2 | + * basefifo.cpp | |
3 | + * | |
4 | + * Created on: 2018/02/26 | |
5 | + * Author: takemasa | |
6 | + */ | |
7 | + | |
8 | +#include <basefifo.hpp> | |
9 | + | |
10 | +namespace murasaki { | |
11 | + | |
12 | +BaseFifo::BaseFifo() | |
13 | +{ | |
14 | + // TODO Auto-generated constructor stub | |
15 | + | |
16 | +} | |
17 | + | |
18 | +BaseFifo::~BaseFifo() | |
19 | +{ | |
20 | + // TODO Auto-generated destructor stub | |
21 | +} | |
22 | + | |
23 | +} /* namespace murasaki */ |
@@ -0,0 +1,32 @@ | ||
1 | +/* | |
2 | + * basefifo.hpp | |
3 | + * | |
4 | + * Created on: 2018/02/26 | |
5 | + * Author: takemasa | |
6 | + */ | |
7 | + | |
8 | +#ifndef BASEFIFO_HPP_ | |
9 | +#define BASEFIFO_HPP_ | |
10 | + | |
11 | +#include <ctype.h> | |
12 | + | |
13 | +namespace murasaki { | |
14 | + | |
15 | +class BaseFifo | |
16 | +{ | |
17 | + public: | |
18 | + BaseFifo(unsigned int buffer_size); | |
19 | + virtual ~BaseFifo(); | |
20 | + unsigned int Put(uint8_t const data[], unsigned int size); | |
21 | + unsigned int Get(uint8_t data[], unsigned int size); | |
22 | + void ReWind(); | |
23 | + private: | |
24 | + unsigned int head_ = 0; | |
25 | + unsigned int tail_ = 0; | |
26 | + uint8_t * const buffer_; | |
27 | + | |
28 | +}; | |
29 | + | |
30 | +} /* namespace murasaki */ | |
31 | + | |
32 | +#endif /* BASEFIFO_HPP_ */ |
@@ -0,0 +1,12 @@ | ||
1 | +/* | |
2 | + * basefifo_test.cpp | |
3 | + * | |
4 | + * Created on: 2018/02/26 | |
5 | + * Author: takemasa | |
6 | + */ | |
7 | + | |
8 | +#include <basefifo.hpp> | |
9 | + | |
10 | +namespace murasaki { | |
11 | + | |
12 | +} /* namespace murasaki */ |