Commit 3f5ef26f authored by Filip Demski's avatar Filip Demski
Browse files

SAMV71: Some wrappers implementation

parent a04320ef
......@@ -7,20 +7,12 @@
@@-- @_Protected_PIs_@ : Protected Provided interfaces (from pi.tmplt)
@@-- @_Unprotected_PIs_@ : Unprotected Provided interfaces (from pi.tmplt)
@@-- @_Required_@ : Required interfaces (from ri.tmplt)
@@IF@@ @_Required_@ /= ""
// Required interfaces of function @_Name_@:
@_Required_@
@@END_IF@@
@@-- @@IF@@ @_Language_@ /= SIMULINK @@-- Simulink's glue is generated from DMT
// SAMV71-TODO: #include "@_LOWER:Name_@_vm_if.h"
#include "@_LOWER:Name_@_vm_if.h"
@@-- @@END_IF@@
@_Protected_PIs_@
void @_LOWER:Name_@_check_queue(BaseType_t* has_pending_msg)
{
*has_pending_msg = pdFALSE;
// SAMV71-TODO: impl
}
......@@ -4,9 +4,10 @@
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f or gf in vim to open the text doc:
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_partition.ascii
/* File generated by kazoo for TASTE - do not edit */
#include <string.h>
#include "@_LOWER:Name_@_interface.h"
#include <string.h>
#include "FreeRTOS.h"
#include "semphr.h"
@_Threads_@
@_Blocks_@
......@@ -28,5 +28,29 @@ void call_protected_@_Parent_Function_@_@_Name_@
@@END_IF@@
@@END_IF@@
{
// SAMV71-TODO: impl
extern SemaphoreHandle_t @_LOWER:Parent_Function_@_Semaphore;
BaseType_t result;
do
{
result = xSemaphoreTake(@_LOWER:Parent_Function_@_Semaphore, portMAX_DELAY);
}
while(result != pdTRUE);
@@IF@@ @_Param_Names'Length_@ = 0
@_LOWER:Parent_Function_@_@_Name_@();
@@ELSE@@
@_LOWER:Parent_Function_@_@_Name_@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
IN_buf_@_LOWER:Param_Names_@, size_IN_buf_@_LOWER:Param_Names_@
@@ELSE@@
OUT_buf_@_LOWER:Param_Names_@, size_OUT_buf_@_LOWER:Param_Names_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@END_IF@@
xSemaphoreGive(@_LOWER:Parent_Function_@_Semaphore);
}
......@@ -43,5 +43,11 @@ void vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@
@@END_INLINE@@
@@END_IF@@
{
// SAMV71-TODO: impl
@@IF@@ @_Kind_@ = SPORADIC_OPERATION
// SAMV71-TODO: impl sporadic
@@ELSIF@@ @_Kind_@ = UNPROTECTED_OPERATION
// SAMV71-TODO: impl unprotected
@@ELSE@@ @@-- PROTECTED_OPERATION
// SAMV71-TODO: impl protected
@@END_IF@@
}
......@@ -18,12 +18,27 @@
@@-- @_IF_Property_Names_@, _Values_@ : user properties (vector tag)
@@--
@@-- Matrix of output ports: Remote thread/corresponding remote PI @_Name_@
#include "@_LOWER:Pro_Block_Name_@_vm_if.h"
void call_@_LOWER:Thread_Name_@ (const char* buf, size_t len)
{
// SAMV71-TODO: impl
}
@@IF@@ @_Need_Mutex_@
extern SemaphoreHandle_t @_LOWER:Pro_Block_Name_@_Semaphore;
static BaseType_t thread_@_LOWER:Thread_Name_@_check_queue()
{
// SAMV71-TODO: impl
BaseType_t result;
do
{
result = xSemaphoreTake(@_LOWER:Pro_Block_Name_@_Semaphore, portMAX_DELAY);
}
while(result != pdTRUE);
@@END_IF@@
@@IF@@ @_Param_Names'Length_@ = 0
@_Thread_Name_@();
@@ELSE@@
@_Thread_Name_@(buf, len);
@@END_IF@@
@@IF@@ @_Need_Mutex_@
xSemaphoreGive(@_LOWER:Pro_Block_Name_@_Semaphore);
@@END_IF@@
}
......@@ -22,4 +22,3 @@
@_Required_@
// End of the required interfaces of function @_Name_@
@@END_IF@@
void @_LOWER:Name_@_check_queue(BaseType_t* has_pending_msg);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment