diff options
| -rw-r--r-- | os/various/bswap.h | 13 | ||||
| -rw-r--r-- | os/various/devices_lib/sensors/hdc1000.c | 14 | ||||
| -rw-r--r-- | os/various/devices_lib/sensors/hdc1000.h | 14 | ||||
| -rw-r--r-- | os/various/devices_lib/sensors/mcp9808.c | 15 | ||||
| -rw-r--r-- | os/various/devices_lib/sensors/mcp9808.h | 12 | ||||
| -rw-r--r-- | os/various/devices_lib/sensors/sensor.h | 15 | ||||
| -rw-r--r-- | os/various/devices_lib/sensors/tsl2561.c | 12 | ||||
| -rw-r--r-- | os/various/devices_lib/sensors/tsl2561.h | 12 | 
8 files changed, 94 insertions, 13 deletions
| diff --git a/os/various/bswap.h b/os/various/bswap.h index 624e4ba..b99034e 100644 --- a/os/various/bswap.h +++ b/os/various/bswap.h @@ -6,15 +6,6 @@ extern "C" {  #endif  #if !(defined(ARCH_BIG_ENDIAN) || defined(ARCH_LITTLE_ENDIAN)) -#if YOTTA_CFG_CONFIG_ARCH_LITTLE_ENDIAN -#define ARCH_LITTLE_ENDIAN -#endif -#if YOTTA_CFG_CONFIG_ARCH_BIG_ENDIAN -#define ARCH_BIG_ENDIAN -#endif -#endif - -#if !(defined(ARCH_BIG_ENDIAN) || defined(ARCH_LITTLE_ENDIAN))  #error "ARCH_BIG_ENDIAN or ARCH_LITTLE_ENDIAN not set."  #endif @@ -27,8 +18,8 @@ extern "C" {      (uint16_t)((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8))  #define BSWAP_32(x)							\      (uint32_t)((((x) & 0xFF000000UL) >> 24UL) |				\ -	       (((x) & 0x00FF0000UL) >> 8UL)  |				\ -	       (((x) & 0x0000FF00UL) << 8UL)  |				\ +	       (((x) & 0x00FF0000UL) >>  8UL) |				\ +	       (((x) & 0x0000FF00UL) <<  8UL) |				\  	       (((x) & 0x000000FFUL) << 24UL)) diff --git a/os/various/devices_lib/sensors/hdc1000.c b/os/various/devices_lib/sensors/hdc1000.c index 218450d..39e47ec 100644 --- a/os/various/devices_lib/sensors/hdc1000.c +++ b/os/various/devices_lib/sensors/hdc1000.c @@ -1,5 +1,17 @@  /* -    HDC1008 for ChibiOS/RT - Copyright (C) 2016 Stephane D'Alu +    HDC100x for ChibiOS/RT - Copyright (C) 2016 Stephane D'Alu + +    Licensed under the Apache License, Version 2.0 (the "License"); +    you may not use this file except in compliance with the License. +    You may obtain a copy of the License at + +        http://www.apache.org/licenses/LICENSE-2.0 + +    Unless required by applicable law or agreed to in writing, software +    distributed under the License is distributed on an "AS IS" BASIS, +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +    See the License for the specific language governing permissions and +    limitations under the License.  */  /** diff --git a/os/various/devices_lib/sensors/hdc1000.h b/os/various/devices_lib/sensors/hdc1000.h index 9533060..e4eae4c 100644 --- a/os/various/devices_lib/sensors/hdc1000.h +++ b/os/various/devices_lib/sensors/hdc1000.h @@ -1,5 +1,17 @@  /* -    HDC1000 for ChibiOS/RT - Copyright (C) 2016 Stephane D'Alu +    HDC100x for ChibiOS/RT - Copyright (C) 2016 Stephane D'Alu + +    Licensed under the Apache License, Version 2.0 (the "License"); +    you may not use this file except in compliance with the License. +    You may obtain a copy of the License at + +        http://www.apache.org/licenses/LICENSE-2.0 + +    Unless required by applicable law or agreed to in writing, software +    distributed under the License is distributed on an "AS IS" BASIS, +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +    See the License for the specific language governing permissions and +    limitations under the License.  */  /** diff --git a/os/various/devices_lib/sensors/mcp9808.c b/os/various/devices_lib/sensors/mcp9808.c index 296c2f1..4b22ea9 100644 --- a/os/various/devices_lib/sensors/mcp9808.c +++ b/os/various/devices_lib/sensors/mcp9808.c @@ -1,3 +1,18 @@ +/* +    MCP9808 for ChibiOS/RT - Copyright (C) 2016 Stephane D'Alu + +    Licensed under the Apache License, Version 2.0 (the "License"); +    you may not use this file except in compliance with the License. +    You may obtain a copy of the License at + +        http://www.apache.org/licenses/LICENSE-2.0 + +    Unless required by applicable law or agreed to in writing, software +    distributed under the License is distributed on an "AS IS" BASIS, +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +    See the License for the specific language governing permissions and +    limitations under the License. +*/  #define I2C_HELPERS_AUTOMATIC_DRV TRUE diff --git a/os/various/devices_lib/sensors/mcp9808.h b/os/various/devices_lib/sensors/mcp9808.h index 3bae5d2..857f2f9 100644 --- a/os/various/devices_lib/sensors/mcp9808.h +++ b/os/various/devices_lib/sensors/mcp9808.h @@ -1,5 +1,17 @@  /*      MCP9808 for ChibiOS/RT - Copyright (C) 2016 Stephane D'Alu + +    Licensed under the Apache License, Version 2.0 (the "License"); +    you may not use this file except in compliance with the License. +    You may obtain a copy of the License at + +        http://www.apache.org/licenses/LICENSE-2.0 + +    Unless required by applicable law or agreed to in writing, software +    distributed under the License is distributed on an "AS IS" BASIS, +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +    See the License for the specific language governing permissions and +    limitations under the License.  */  #ifndef _SENSOR_MCP9808_H_ diff --git a/os/various/devices_lib/sensors/sensor.h b/os/various/devices_lib/sensors/sensor.h index 6ffa5a4..bd544b1 100644 --- a/os/various/devices_lib/sensors/sensor.h +++ b/os/various/devices_lib/sensors/sensor.h @@ -1,3 +1,18 @@ +/* +    Copyright (C) 2016 Stephane D'Alu +    Licensed under the Apache License, Version 2.0 (the "License"); +    you may not use this file except in compliance with the License. +    You may obtain a copy of the License at + +        http://www.apache.org/licenses/LICENSE-2.0 + +    Unless required by applicable law or agreed to in writing, software +    distributed under the License is distributed on an "AS IS" BASIS, +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +    See the License for the specific language governing permissions and +    limitations under the License. +*/ +  /**   *    * Example of function calls. diff --git a/os/various/devices_lib/sensors/tsl2561.c b/os/various/devices_lib/sensors/tsl2561.c index f67823a..954c098 100644 --- a/os/various/devices_lib/sensors/tsl2561.c +++ b/os/various/devices_lib/sensors/tsl2561.c @@ -1,5 +1,17 @@  /*      TSL2561 for ChibiOS/RT - Copyright (C) 2016 Stephane D'Alu + +    Licensed under the Apache License, Version 2.0 (the "License"); +    you may not use this file except in compliance with the License. +    You may obtain a copy of the License at + +        http://www.apache.org/licenses/LICENSE-2.0 + +    Unless required by applicable law or agreed to in writing, software +    distributed under the License is distributed on an "AS IS" BASIS, +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +    See the License for the specific language governing permissions and +    limitations under the License.  */  #define I2C_HELPERS_AUTOMATIC_DRV TRUE diff --git a/os/various/devices_lib/sensors/tsl2561.h b/os/various/devices_lib/sensors/tsl2561.h index d91fb4a..94e1ede 100644 --- a/os/various/devices_lib/sensors/tsl2561.h +++ b/os/various/devices_lib/sensors/tsl2561.h @@ -1,5 +1,17 @@  /*      TSL2561 for ChibiOS/RT - Copyright (C) 2016 Stephane D'Alu + +    Licensed under the Apache License, Version 2.0 (the "License"); +    you may not use this file except in compliance with the License. +    You may obtain a copy of the License at + +        http://www.apache.org/licenses/LICENSE-2.0 + +    Unless required by applicable law or agreed to in writing, software +    distributed under the License is distributed on an "AS IS" BASIS, +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +    See the License for the specific language governing permissions and +    limitations under the License.  */  /** | 
