Return data from c function

Hi All
I need to retrieve data from c function to python function.

Python:
@c_native(“read_usart9”,[“c.c”],[])
def Usart9Read(data):
pass

C:
C_NATIVE(read_usart9)
{
C_NATIVE_UNWARN();
uint8_t* msg;
uint32_t len;
uint16_t result[64] = {0};

parse_py_args("s", nargs, args, &msg, &len);
....
....
*res = PSEQUENCE_ELEMENTS(result);
return ERR_OK;

}

How can I return “res” object to function Usart9Read?
Thanks

according to the C language interface
, *res will return the result array to the python function.
Have a look at the C language example too.
Try printing the return value of Usart9Read () and let me know the results.

It’s OK: c function return indeed *res :blush:
Thank you for hints.
In future, I’ll read documentation understandingly.