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:
parent
5469ba1d49
commit
144a0700f5
@ -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 */
|
||||
}
|
||||
|
3
sys/auto_init/can/Makefile
Normal file
3
sys/auto_init/can/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
MODULE = auto_init_can
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
32
sys/auto_init/can/auto_init_can.c
Normal file
32
sys/auto_init/can/auto_init_can.c
Normal 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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user