From 105ac6e46f055b470613be39f179a597337dea4b Mon Sep 17 00:00:00 2001
From: cmoineau <cyril.moineau@cea.fr>
Date: Wed, 21 Aug 2024 07:54:14 +0000
Subject: [PATCH] Use aidge2c to convert datatype instead of
 aidge_datatype2ctype.

---
 aidge_export_arm_cortexm/export.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/aidge_export_arm_cortexm/export.py b/aidge_export_arm_cortexm/export.py
index 5179937..26e7d87 100644
--- a/aidge_export_arm_cortexm/export.py
+++ b/aidge_export_arm_cortexm/export.py
@@ -3,7 +3,7 @@ import os
 import shutil
 from pathlib import Path
 import numpy as np
-
+from aidge_core.export_utils.data_conversion import aidge2c
 from aidge_core.export_utils.code_generation import *
 from aidge_export_arm_cortexm.utils import (ROOT, AVAILABLE_BOARDS, has_board, \
                                             OPERATORS_REGISTRY, supported_operators)
@@ -98,7 +98,7 @@ def export(export_folder_name,
     for node in graphview.get_nodes():
         if node.type() == "Producer":
             if not node.get_operator().get_attr("Constant"):
-                export_type = aidge_datatype2ctype(node.get_operator().get_output(0).dtype())
+                export_type = aidge2c(node.get_operator().get_output(0).dtype())
                 list_inputs_name.append((export_type, node.name()))
 
     # Get output nodes
@@ -108,9 +108,9 @@ def export(export_folder_name,
         if len(node.get_children()) == 0:
             if node.get_operator().has_attr("DataType"):
                 # Temporary fix because impossible to set DataType of a generic operator
-                export_type = aidge_datatype2ctype(node.get_operator().get_attr("DataType"))
+                export_type = aidge2c(node.get_operator().get_attr("DataType"))
             else:
-                export_type = aidge_datatype2ctype(node.get_operator().get_output(0).dtype())
+                export_type = aidge2c(node.get_operator().get_output(0).dtype())
 
             list_outputs_name.append((export_type, node.name()))
 
-- 
GitLab