-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve naming of thread stacksize/priority constants
As discussed in #2725, this commit renames a number of stacksize constants to better convey their intended usage. In addition, constants for thread priority are given a `THREAD_` prefix. Changes are: * KERNEL_CONF_STACKSIZE_PRINTF renamed to THREAD_EXTRA_STACKSIZE_PRINTF * KERNEL_CONF_STACKSIZE_DEFAULT renamed to THREAD_STACKSIZE_DEFAULT * KERNEL_CONF_STACKSIZE_IDLE renamed to THREAD_STACKSIZE_IDLE * KERNEL_CONF_STACKSIZE_MAIN renamed to THREAD_STACKSIZE_MAIN * Move thread stacksizes from kernel.h to thread.h, since the prefix changed * PRIORITY_MIN renamed to THREAD_PRIORITY_MIN * PRIORITY_IDLE renamed to THREAD_PRIORITY_IDLE * PRIORITY_MAIN renamed to THREAD_PRIORITY_MAIN * Move thread priorities from kernel.h to thread.h since the prefix has changed * MINIMUM_STACK_SIZE renamed to THREAD_STACKSIZE_MINIMUM for consistency
- Loading branch information
Showing
95 changed files
with
638 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright (C) 2015 Freie Universität Berlin | ||
* | ||
* 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 boards_iot-lab_M3 | ||
* @{ | ||
* | ||
* @file | ||
* @brief Network device initialization code | ||
* | ||
* @author Hauke Petersen <[email protected]> | ||
* | ||
* @} | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
#include "board.h" | ||
#include "auto_init.h" | ||
#include "ng_at86rf2xx.h" | ||
#include "net/ng_nomac.h" | ||
#include "net/ng_netbase.h" | ||
|
||
#define ENABLE_DEBUG (0) | ||
#include "debug.h" | ||
|
||
/** | ||
* @brief Define stack parameters for the MAC layer thread | ||
* @{ | ||
*/ | ||
#define MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT) | ||
#define MAC_PRIO (THREAD_PRIORITY_MAIN - 3) | ||
/** @} */ | ||
|
||
/** | ||
* @brief Device descriptor for the Atmel radio | ||
*/ | ||
static ng_at86rf2xx_t radio; | ||
|
||
/** | ||
* @brief Stack for the MAC layer thread | ||
*/ | ||
static char nomac_stack[MAC_STACKSIZE]; | ||
|
||
|
||
void auto_init_ng_netif(void) | ||
{ | ||
/* initialize the radio */ | ||
DEBUG("Initializing AT86RF231 radio\n"); | ||
ng_at86rf2xx_init(&radio, AT86RF231_SPI, AT86RF231_SPI_CLK, | ||
AT86RF231_CS, AT86RF231_INT, | ||
AT86RF231_SLEEP, AT86RF231_RESET); | ||
/* starting NOMAC */ | ||
DEBUG("Starting the MAC layer\n"); | ||
ng_nomac_init(nomac_stack, sizeof(nomac_stack), MAC_PRIO, "at86rf233", | ||
(ng_netdev_t *)(&radio)); | ||
DEBUG("Auto init of on-board radio complete\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.