FunctionΒΆ

f = CFunction(
        name="examplefun",
        return_type=Cuint32,
        arguments=[
            CFunction.Argument(name="first", c_type=Cuint32, doc=Doc("First argument")),
            CFunction.Argument(name="second", c_type=Cdouble, default=2, doc=Doc("Second Argument"))
        ],
        static=True,
        doc=Doc("Awesome function", "This function is awesome because it does marvellous things",
                ret="returns a lucky number")
    )
print(f.declaration())
/**
 * @brief Awesome function
 * 
 * This function is awesome because it does marvellous things
 * @param first First argument
 * @param second Second Argument
 * @return returns a lucky number
 */
static uint32_t examplefun(uint32_t first, double second = 2);
print(f.definition())
static uint32_t examplefun(uint32_t first, double second)
{

};