Skip to content

yashi/libcanard

 
 

Repository files navigation

Zephyr modularized libcanard

This is a Zephyr modularized version of libcanard. The original README is renamed to README-orig.md.

To use it in your project, add something like the following in your west.yml.

- name: libcanard
  url: https://github.com/yashi/libcanard
  revision: zephyr
  path: modules/lib/libcanard

And use it as usual in your app.

#include <zephyr/kernel.h>

#include <libcanard/canard.h>

static void* memAllocate(CanardInstance* const canard, const size_t amount)
{
	(void)canard;
	return k_malloc(amount);
}

static void memFree(CanardInstance* const canard, void* const pointer)
{
	(void) canard;
	k_free(pointer);
}

int main(void)
{
	CanardInstance canard;

	canard = canardInit(&memAllocate, &memFree);
	printk("Hello libcanard!\n");

	return 0;
}

About

Fork of libcanard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 87.0%
  • C 12.4%
  • CMake 0.6%