1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

can: add autoinit basic support

This commit is contained in:
Vincent Dupont 2016-11-23 19:05:35 +01:00
parent 5469ba1d49
commit 144a0700f5
5 changed files with 48 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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 */
}

View File

@ -0,0 +1,3 @@
MODULE = auto_init_can
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,32 @@
/*
* 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();
}