Skip to content
Snippets Groups Projects
Commit 144a0700 authored by Vincent Dupont's avatar Vincent Dupont
Browse files

can: add autoinit basic support

parent 5469ba1d
No related branches found
No related tags found
No related merge requests found
......@@ -568,6 +568,7 @@ endif
ifneq (,$(filter can,$(USEMODULE)))
USEMODULE += can_raw
USEMODULE += auto_init_can
ifneq (,$(filter can_mbox,$(USEMODULE)))
USEMODULE += core_mbox
endif
......
......@@ -12,4 +12,8 @@ ifneq (,$(filter auto_init_storage,$(USEMODULE)))
DIRS += storage
endif
ifneq (,$(filter auto_init_can,$(USEMODULE)))
DIRS += can
endif
include $(RIOTBASE)/Makefile.base
......@@ -361,4 +361,12 @@ void auto_init(void)
#endif
#endif /* MODULE_AUTO_INIT_STORAGE */
#ifdef MODULE_AUTO_INIT_CAN
DEBUG("auto_init CAN\n");
extern void auto_init_candev(void);
auto_init_candev();
#endif /* MODULE_AUTO_INIT_CAN */
}
MODULE = auto_init_can
include $(RIOTBASE)/Makefile.base
/*
* Copyright (C) 2016 OTA keys S.A.
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup auto_init
* @{
* @file
* @brief initializes can device init function
*
* @author Toon Stegen <toon.stegen@altran.com>
* @author Vincent Dupont <vincent@otakeys.com>
* @author Aurelien Gonce <aurelien.gonce@altran.com>
* @}
*/
#include <stdio.h>
#define ENABLE_DEBUG (0)
#include "debug.h"
#include "can/dll.h"
void auto_init_candev(void)
{
DEBUG("auto_init_can: init dll\n");
can_dll_init();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment