Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
b77778b3
Commit
b77778b3
authored
Nov 16, 2021
by
Filip Demski
Browse files
SAMV71: Implemented transport
parent
f22c963c
Changes
6
Hide whitespace changes
Inline
Side-by-side
templates/concurrency_view/generic_freertos_thread_body/thread.tmplt
View file @
b77778b3
...
...
@@ -31,8 +31,7 @@ extern QueueHandle_t @_Thread_Name_@_Global_Queue;
@@IF@@ @_RCM_@ = "CYCLIC_OPERATION"
void @_Thread_Name_@_Timer_Callback(TimerHandle_t timer)
{
struct Thread@_CAPITALIZE:Thread_Name_@Request request;
request.m_length = 0;
struct Thread@_CAPITALIZE:Thread_Name_@Request request = {0};
xQueueSend(@_Thread_Name_@_Global_Queue, &request, 0);
}
...
...
@@ -55,7 +54,7 @@ void @_LOWER:Thread_Name_@_job(void* pvParameters)
for(;;)
{
struct Thread@_CAPITALIZE:Thread_Name_@Request request;
struct Thread@_CAPITALIZE:Thread_Name_@Request request
= {0}
;
BaseType_t result = xQueueReceive(@_Thread_Name_@_Global_Queue,
&request,
portMAX_DELAY);
...
...
templates/concurrency_view/generic_freertos_transport_body/partition.tmplt
View file @
b77778b3
...
...
@@ -5,12 +5,19 @@
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_partition.ascii
#include "transport.h"
#include <FreeRTOS.h>
#include <task.h>
#include <queue.h>
// Sporadic required
@@TABLE@@
void deliver_to_@_LOWER:Out_Port_Remote_Function_@_@_LOWER:Out_Port_Remote_Port_Name_@(
const uint8_t* const data, const size_t length)
{
// SAMV71-TODO: impl
Broker_deliver_request(
INTERFACE_@_UPPER:Out_Port_Remote_Function_@_@_UPPER:Out_Port_Remote_Port_Name_@,
data,
length);
}
@@END_TABLE@@
...
...
@@ -19,5 +26,7 @@ const uint8_t* const data, const size_t length)
void initialize_transport()
{
// SAMV71-TODO: impl
@@TABLE@@
interface_to_deliver_function[INTERFACE_@_UPPER:In_Port_Thread_Name_@] = &deliver_to_@_LOWER:In_Port_Thread_Name_@;
@@END_TABLE@@
}
templates/concurrency_view/generic_freertos_transport_body/thread.tmplt
View file @
b77778b3
...
...
@@ -18,10 +18,20 @@
@@--
@@-- Matrix of output ports: Remote thread/corresponding remote PI @_Name_@
@@IF@@ @_RCM_@ /= "CYCLIC_OPERATION"
#include "thread_@_LOWER:Thread_Name_@.h"
void deliver_to_@_LOWER:Thread_Name_@(const uint8_t* const data, const size_t length)
{
// SAMV71-TODO: impl
extern QueueHandle_t @_Thread_Name_@_Global_Queue;
struct Thread@_CAPITALIZE:Thread_Name_@Request request = {0};
if(length > 0)
{
memcpy(request.m_data, data, length);
}
request.m_length = length;
xQueueSend(@_Thread_Name_@_Global_Queue, &request, 0);
}
@@END_IF@@
templates/concurrency_view/generic_freertos_transport_header/partition.tmplt
View file @
b77778b3
...
...
@@ -26,4 +26,6 @@ void deliver_to_@_LOWER:Out_Port_Remote_Function_@_@_LOWER:Out_Port_Remote_Port_
void deliver_to_@_LOWER:Thread_Names_@(const uint8_t* const data, const size_t length);
@@END_TABLE@@
extern deliver_function interface_to_deliver_function[INTERFACE_MAX_ID];
#endif
templates/concurrency_view/generic_freertos_wrappers_body/ri.tmplt
View file @
b77778b3
...
...
@@ -46,7 +46,7 @@ void vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@
@@IF@@ @_Kind_@ = SPORADIC_OPERATION
@@IF@@ @_No_Param_@
static uint8_t buffer_placeholder[1];
deliver_to_@_LOWER:Remote_Function_Names_@_@_LOWER:Remote_Interface_Names_@(buffer_placeholde, 0);
deliver_to_@_LOWER:Remote_Function_Names_@_@_LOWER:Remote_Interface_Names_@(buffer_placeholde
r
, 0);
@@ELSE@@
deliver_to_@_LOWER:Remote_Function_Names_@_@_LOWER:Remote_Interface_Names_@(
(const uint8_t*)(IN_buf_@_LOWER:Param_Names_@),
...
...
templates/concurrency_view/samv71_freertos_main/partition.tmplt
View file @
b77778b3
...
...
@@ -39,6 +39,8 @@ void vApplicationGetTimerTaskMemory(StaticTask_t** ppxTimerTaskPCBBuffer,
extern void init_@_LOWER:Bound_Functions_@(void);
@@END_TABLE@@
deliver_function interface_to_deliver_function[INTERFACE_MAX_ID];
Uart consoleUart;
@@TABLE@@
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment