Skip to content

Commit 03e2479

Browse files
Comment corrections for CMSIS-Stream examples
1 parent 639ede3 commit 03e2479

6 files changed

Lines changed: 8 additions & 12 deletions

File tree

Examples/CMSISStreamHelloZephyr/src/nodes/DebugEvtSink.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ class DebugEvtSink: public StreamNode
1010
enum selector {selMessage=0};
1111
static std::array<uint16_t,1> selectors;
1212

13-
// The constructor for the sink is only using
14-
// the input FIFO (coming from the generated scheduler).
15-
// This FIFO is passed to the GenericSink contructor.
16-
// Implementation of this Sink constructor is doing nothing
1713
DebugEvtSink():StreamNode(),eventCount(0){};
1814

1915
void messageReceived(float v)
@@ -24,6 +20,7 @@ class DebugEvtSink: public StreamNode
2420

2521
cg_status processEvent(int dstPort,Event &&evt) final
2622
{
23+
// "message" event received
2724
if (evt.event_id == selectors[selMessage])
2825
{
2926
if (evt.wellFormed<float>())

Examples/CMSISStreamHelloZephyr/src/nodes/DebugProcess.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
using namespace arm_cmsis_stream;
1212

13-
// This template can only be instaintiated with OUT = float,
13+
// This template can only be instantiated with OUT = float,
1414
//but we keep it generic for demonstration purposes.
1515
template <typename IN, int inputSamples,typename OUT,int outputSamples>
1616
class DebugProcess;

Examples/CMSISStreamHelloZephyr/src/nodes/DebugSink.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
using namespace arm_cmsis_stream;
99

10-
// This template can only be instaintiated with OUT = float,
10+
// This template can only be instantiated with OUT = float,
1111
// but we keep it generic for demonstration purposes.
1212
template <typename IN, int inputSamples>
1313
class DebugSink : public GenericSink<IN, inputSamples> {
@@ -26,6 +26,7 @@ class DebugSink : public GenericSink<IN, inputSamples> {
2626
int run() final {
2727
IN *input = this->getReadBuffer();
2828

29+
// Send an async event "message" on output 0
2930
ev0.sendAsync(kNormalPriority,selectors[selMessage],input[0]);
3031
nb++;
3132
total_nb++;

Examples/hello_example/Hello/nodes/DebugEvtSink.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ class DebugEvtSink: public StreamNode
1010
enum selector {selMessage=0};
1111
static std::array<uint16_t,1> selectors;
1212

13-
// The constructor for the sink is only using
14-
// the input FIFO (coming from the generated scheduler).
15-
// This FIFO is passed to the GenericSink contructor.
16-
// Implementation of this Sink constructor is doing nothing
1713
DebugEvtSink():StreamNode(),eventCount(0){};
1814

1915
void messageReceived(float v)
@@ -24,6 +20,7 @@ class DebugEvtSink: public StreamNode
2420

2521
cg_status processEvent(int dstPort,Event &&evt) final
2622
{
23+
// "message" event received
2724
if (evt.event_id == selectors[selMessage])
2825
{
2926
if (evt.wellFormed<float>())

Examples/hello_example/Hello/nodes/DebugProcess.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
using namespace arm_cmsis_stream;
1212

13-
// This template can only be instaintiated with OUT = float,
13+
// This template can only be instantiated with OUT = float,
1414
//but we keep it generic for demonstration purposes.
1515
template <typename IN, int inputSamples,typename OUT,int outputSamples>
1616
class DebugProcess;

Examples/hello_example/Hello/nodes/DebugSink.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
using namespace arm_cmsis_stream;
99

10-
// This template can only be instaintiated with OUT = float,
10+
// This template can only be instantiated with OUT = float,
1111
// but we keep it generic for demonstration purposes.
1212
template <typename IN, int inputSamples>
1313
class DebugSink : public GenericSink<IN, inputSamples> {
@@ -26,6 +26,7 @@ class DebugSink : public GenericSink<IN, inputSamples> {
2626
int run() final {
2727
IN *input = this->getReadBuffer();
2828

29+
// Send an async event "message" on output 0
2930
ev0.sendAsync(kNormalPriority,selectors[selMessage],input[0]);
3031
nb++;
3132
total_nb++;

0 commit comments

Comments
 (0)