diff options
author | px4dev <px4@purgatory.org> | 2012-09-16 16:42:10 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-09-16 16:42:10 -0700 |
commit | 2b82c733a9c3b55ac8508d27d70281f7193d7760 (patch) | |
tree | cf1e58b11332dabc9ad10d996486d107b19a19f4 /nuttx/include | |
parent | f7949a904b996eccdf3d6d124833cba5d42be997 (diff) | |
parent | cdaf7270614ab2294b6654bffbd7b6bc88c73389 (diff) | |
download | px4-firmware-2b82c733a9c3b55ac8508d27d70281f7193d7760.tar.gz px4-firmware-2b82c733a9c3b55ac8508d27d70281f7193d7760.tar.bz2 px4-firmware-2b82c733a9c3b55ac8508d27d70281f7193d7760.zip |
Merge branch 'NuttX/master'
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5163 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/analog/adc.h | 3 | ||||
-rw-r--r-- | nuttx/include/nuttx/compiler.h | 24 | ||||
-rw-r--r-- | nuttx/include/nuttx/mtd.h | 13 |
3 files changed, 35 insertions, 5 deletions
diff --git a/nuttx/include/nuttx/analog/adc.h b/nuttx/include/nuttx/analog/adc.h index 873f5d9da..f654bff05 100644 --- a/nuttx/include/nuttx/analog/adc.h +++ b/nuttx/include/nuttx/analog/adc.h @@ -47,6 +47,7 @@ ************************************************************************************/ #include <nuttx/config.h> +#include <nuttx/compiler.h> #include <sys/types.h> #include <stdint.h> @@ -78,7 +79,7 @@ struct adc_msg_s { uint8_t am_channel; /* The 8-bit ADC Channel */ int32_t am_data; /* ADC convert result (4 bytes) */ -} __attribute__((__packed__)); +} packed_struct; struct adc_fifo_s { diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h index 733d58eec..1e0af4382 100644 --- a/nuttx/include/nuttx/compiler.h +++ b/nuttx/include/nuttx/compiler.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/compiler.h * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -92,6 +92,14 @@ # define reentrant_function # define naked_function +/* The inline_function attribute informs GCC that the function should always + * be inlined, regardless of the level of optimization. The noinline_function + * indicates that the function should never be inlined. + */ + +# define inline_function __attribute__ ((always_inline)) +# define noinline_function __attribute__ ((noinline)) + /* GCC has does not use storage classes to qualify addressing */ # define FAR @@ -224,10 +232,15 @@ # define noreturn_function # define packed_struct -/* SDCC does support "naked" function s*/ +/* SDCC does support "naked" functions */ # define naked_function __naked +/* SDCC does not support forced inlining. */ + +# define inline_function +# define noinline_function + /* The reentrant attribute informs SDCC that the function * must be reentrant. In this case, SDCC will store input * arguments on the stack to support reentrancy. @@ -320,11 +333,13 @@ # define weak_function # define weak_const_function -/* The Zilog compiler does not support the noreturn, packed, or naked attributes */ +/* The Zilog compiler does not support the noreturn, packed, naked attributes */ # define noreturn_function # define packed_struct # define naked_function +# define inline_function +# define noinline_function /* The Zilog compiler does not support the reentrant attribute */ @@ -406,7 +421,8 @@ # define packed_struct # define reentrant_function # define naked_function - +# define inline_function +# define noinline_function # define FAR # define NEAR diff --git a/nuttx/include/nuttx/mtd.h b/nuttx/include/nuttx/mtd.h index 5b955a45f..44582c412 100644 --- a/nuttx/include/nuttx/mtd.h +++ b/nuttx/include/nuttx/mtd.h @@ -220,6 +220,19 @@ EXTERN FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_dev_s *dev); EXTERN FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev); + +/**************************************************************************** + * Name: w25_initialize + * + * Description: + * Create an initialized MTD device instance. MTD devices are not registered + * in the file system, but are created as instances that can be bound to + * other functions (such as a block or character driver front end). + * + ****************************************************************************/ + +EXTERN FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *dev); + #undef EXTERN #ifdef __cplusplus } |