aboutsummaryrefslogtreecommitdiffstats
path: root/os/various/devices_lib
diff options
context:
space:
mode:
Diffstat (limited to 'os/various/devices_lib')
-rw-r--r--os/various/devices_lib/mems/l3gd20.c (renamed from os/various/devices_lib/l3gd20.c)15
-rw-r--r--os/various/devices_lib/mems/l3gd20.h (renamed from os/various/devices_lib/l3gd20.h)13
-rw-r--r--os/various/devices_lib/mems/lis3mdl.c (renamed from os/various/devices_lib/lis3mdl.c)13
-rw-r--r--os/various/devices_lib/mems/lis3mdl.h (renamed from os/various/devices_lib/lis3mdl.h)16
-rw-r--r--os/various/devices_lib/mems/lsm303dlhc.c (renamed from os/various/devices_lib/lsm303dlhc.c)14
-rw-r--r--os/various/devices_lib/mems/lsm303dlhc.h (renamed from os/various/devices_lib/lsm303dlhc.h)13
-rw-r--r--os/various/devices_lib/mems/lsm6ds0.c (renamed from os/various/devices_lib/lsm6ds0.c)12
-rw-r--r--os/various/devices_lib/mems/lsm6ds0.h (renamed from os/various/devices_lib/lsm6ds0.h)11
-rw-r--r--os/various/devices_lib/others/max7219.c (renamed from os/various/devices_lib/max7219.c)11
-rw-r--r--os/various/devices_lib/others/max7219.h (renamed from os/various/devices_lib/max7219.h)8
-rw-r--r--os/various/devices_lib/rf/nrf24l01.c (renamed from os/various/devices_lib/nrf24l01.c)17
-rw-r--r--os/various/devices_lib/rf/nrf24l01.h (renamed from os/various/devices_lib/nrf24l01.h)10
12 files changed, 62 insertions, 91 deletions
diff --git a/os/various/devices_lib/l3gd20.c b/os/various/devices_lib/mems/l3gd20.c
index 2d93ee8..1cc52c9 100644
--- a/os/various/devices_lib/l3gd20.c
+++ b/os/various/devices_lib/mems/l3gd20.c
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -21,7 +21,9 @@
Special thanks to Giovanni Di Sirio for teachings, his moral support and
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
- Please refer to ChibiOS/RT license before use it.
+ Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -35,10 +37,8 @@
#include "ch.h"
#include "hal.h"
-#include "play.h"
#include "l3gd20.h"
-#if (GYRO_USE_L3GD20) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
/*===========================================================================*/
@@ -85,7 +85,7 @@ void l3gd20WriteRegister(SPIDriver *spip, uint8_t reg, uint8_t value) {
/* Reserved register must not be written, according to the datasheet
* this could permanently damage the device.
*/
- chDbgAssert(FALSE, "lg3d20WriteRegister(), #1", "reserved register");
+ chDbgAssert(FALSE, "lg3d20WriteRegister(), reserved register");
case L3GD20_AD_WHO_AM_I:
case L3GD20_AD_OUT_TEMP :
case L3GD20_AD_STATUS_REG:
@@ -120,7 +120,4 @@ void l3gd20WriteRegister(SPIDriver *spip, uint8_t reg, uint8_t value) {
spiUnselect(spip);
}
}
-
-#endif /* (GYRO_USE_L3GD20) */
-
/** @} */
diff --git a/os/various/devices_lib/l3gd20.h b/os/various/devices_lib/mems/l3gd20.h
index 3fc58cb..08d9092 100644
--- a/os/various/devices_lib/l3gd20.h
+++ b/os/various/devices_lib/mems/l3gd20.h
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -34,16 +36,13 @@
#ifndef _L3GD20_H_
#define _L3GD20_H_
-#if (GYRO_USE_L3GD20) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
-#if (PLAY_USE_FLOAT) || defined(__DOXYGEN__)
#define L3GD20_SENS_250DPS ((float)131.072f) /*!< gyroscope sensitivity with 250 dps full scale [LSB/dps] */
#define L3GD20_SENS_500DPS ((float)65.536f) /*!< gyroscope sensitivity with 500 dps full scale [LSB/dps] */
#define L3GD20_SENS_2000DPS ((float)16.384f) /*!< gyroscope sensitivity with 2000 dps full scale [LSB/dps] */
-#endif /* PLAY_USE_FLOAT */
/**
* @name L3GD20 register names
* @{
@@ -238,11 +237,7 @@ extern "C" {
}
#endif
-#endif /* GYRO_USE_L3GD20 */
#endif /* _L3GD20_H_ */
/** @} */
-/*
- * TODO PLAY--> add i2c support, and Multiple reg read.
- */
diff --git a/os/various/devices_lib/lis3mdl.c b/os/various/devices_lib/mems/lis3mdl.c
index dba95c3..99b71e4 100644
--- a/os/various/devices_lib/lis3mdl.c
+++ b/os/various/devices_lib/mems/lis3mdl.c
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -35,11 +37,8 @@
#include "ch.h"
#include "hal.h"
-#include "play.h"
#include "lis3mdl.h"
-#if (COMP_USE_LIS3MDL) || defined(__DOXYGEN__)
-
/*===========================================================================*/
/* Driver local definitions. */
/*===========================================================================*/
@@ -117,7 +116,7 @@ void lis3mdlWriteRegister(I2CDriver *i2cp, uint8_t sad, uint8_t sub,
/* Reserved register must not be written, according to the datasheet
* this could permanently damage the device.
*/
- chDbgAssert(FALSE, "lis3mdlWriteRegister(), #1", "reserved register");
+ chDbgAssert(FALSE, "lis3mdlWriteRegister(), reserved register");
case LIS3MDL_SUB_WHO_AM_I:
case LIS3MDL_SUB_STATUS_REG:
case LIS3MDL_SUB_OUT_X_L:
@@ -149,6 +148,4 @@ void lis3mdlWriteRegister(I2CDriver *i2cp, uint8_t sad, uint8_t sub,
break;
}
}
-
-#endif /* COMP_USE_LIS3MDL */
/** @} */
diff --git a/os/various/devices_lib/lis3mdl.h b/os/various/devices_lib/mems/lis3mdl.h
index 8ef37ef..e55978e 100644
--- a/os/various/devices_lib/lis3mdl.h
+++ b/os/various/devices_lib/mems/lis3mdl.h
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -34,17 +36,14 @@
#ifndef _LIS3MDL_H_
#define _LIS3MDL_H_
-#if (COMP_USE_LIS3MDL) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
-#if (PLAY_USE_FLOAT) || defined(__DOXYGEN__)
#define LIS3MDL_COMP_SENS_4GA ((float)6842.0f) /*!< compass sensitivity with 4 GA full scale [LSB / Ga] */
-#define LIS3MDL_COMP_SENS_8GA ((float)3421.0f) /*!< compass sensitivity with 8 GA full scale [LSB / Ga] */
-#define LIS3MDL_COMP_SENS_12GA ((float)2281.0f) /*!< compass sensitivity with 12 GA full scale [LSB / Ga] */
-#define LIS3MDL_COMP_SENS_16GA ((float)1711.0f) /*!< compass sensitivity with 16 GA full scale [LSB / Ga] */
-#endif /* PLAY_USE_FLOAT */
+#define LIS3MDL_COMP_SENS_8GA ((float)3421.0f) /*!< compass sensitivity with 8 GA full scale [LSB / Ga] */
+#define LIS3MDL_COMP_SENS_12GA ((float)2281.0f) /*!< compass sensitivity with 12 GA full scale [LSB / Ga] */
+#define LIS3MDL_COMP_SENS_16GA ((float)1711.0f) /*!< compass sensitivity with 16 GA full scale [LSB / Ga] */
/**
* @name LIS3MDL register names
* @{
@@ -254,7 +253,6 @@ extern "C" {
}
#endif
-#endif /* COMP_USE_LIS3MDL */
#endif /* _LIS3MDL_H_ */
/** @} */
diff --git a/os/various/devices_lib/lsm303dlhc.c b/os/various/devices_lib/mems/lsm303dlhc.c
index 7861255..070c49c 100644
--- a/os/various/devices_lib/lsm303dlhc.c
+++ b/os/various/devices_lib/mems/lsm303dlhc.c
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -35,11 +37,8 @@
#include "ch.h"
#include "hal.h"
-#include "play.h"
#include "lsm303dlhc.h"
-#if (ACCEL_USE_LSM303DLHC) || (COMP_USE_LSM303DLHC) || defined(__DOXYGEN__)
-
/*===========================================================================*/
/* Driver local definitions. */
/*===========================================================================*/
@@ -121,7 +120,7 @@ void lsm303dlhcWriteRegister(I2CDriver *i2cp,uint8_t sad, uint8_t sub,
/* Reserved register must not be written, according to the datasheet
* this could permanently damage the device.
*/
- chDbgAssert(FALSE, "lsm303dlhcWriteRegister(), #1", "reserved register");
+ chDbgAssert(FALSE, "lsm303dlhcWriteRegister(), reserved register");
case LSM303DLHC_SUB_ACC_STATUS_REG:
case LSM303DLHC_SUB_ACC_OUT_X_L:
case LSM303DLHC_SUB_ACC_OUT_X_H:
@@ -172,7 +171,7 @@ void lsm303dlhcWriteRegister(I2CDriver *i2cp,uint8_t sad, uint8_t sub,
/* Reserved register must not be written, according to the datasheet
* this could permanently damage the device.
*/
- chDbgAssert(FALSE, "lsm303dlhcWriteRegister(), #1", "reserved register");
+ chDbgAssert(FALSE, "lsm303dlhcWriteRegister(), reserved register");
case LSM303DLHC_SUB_COMP_OUT_X_H:
case LSM303DLHC_SUB_COMP_OUT_X_L:
case LSM303DLHC_SUB_COMP_OUT_Z_H:
@@ -203,5 +202,4 @@ void lsm303dlhcWriteRegister(I2CDriver *i2cp,uint8_t sad, uint8_t sub,
}
}
}
-#endif /* (ACCEL_USE_LSM303DLHC) || (COMP_USE_LSM303DLHC) */
/** @} */
diff --git a/os/various/devices_lib/lsm303dlhc.h b/os/various/devices_lib/mems/lsm303dlhc.h
index 4ea788a..46b51bc 100644
--- a/os/various/devices_lib/lsm303dlhc.h
+++ b/os/various/devices_lib/mems/lsm303dlhc.h
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -35,12 +37,10 @@
#ifndef _LSM303DLHC_H_
#define _LSM303DLHC_H_
-#if (ACCEL_USE_LSM303DLHC) || (COMP_USE_LSM303DLHC) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
-#if (PLAY_USE_FLOAT) || defined(__DOXYGEN__)
#define LSM303DLHC_ACC_SENS_2G ((float)1671.836f) /*!< Accelerometer sensitivity with 2 G full scale [LSB * s^2 / m] */
#define LSM303DLHC_ACC_SENS_4G ((float)835.918f) /*!< Accelerometer sensitivity with 4 G full scale [LSB * s^2 / m] */
#define LSM303DLHC_ACC_SENS_8G ((float)417.959f) /*!< Accelerometer sensitivity with 8 G full scale [LSB * s^2 / m] */
@@ -61,7 +61,6 @@
#define LSM303DLHC_COMP_SENS_Z_4_7GA ((float)355.0f) /*!< Compass sensitivity with 4.7 GA full scale [LSB / Ga] */
#define LSM303DLHC_COMP_SENS_Z_5_6GA ((float)295.0f) /*!< Compass sensitivity with 5.6 GA full scale [LSB / Ga] */
#define LSM303DLHC_COMP_SENS_Z_8_1GA ((float)205.0f) /*!< Compass sensitivity with 8.1 GA full scale [LSB / Ga] */
-#endif /* PLAY_USE_FLOAT */
/**
* @name LSM303DLHC register names
* @{
@@ -348,10 +347,6 @@ extern "C" {
#ifdef __cplusplus
}
#endif
-#endif /* (ACCEL_USE_LSM303DLHC) || (COMP_USE_LSM303DLHC) */
#endif /* _LSM303DLHC_H_ */
/** @} */
-/*
- * TODO PLAY--> add spi support, and Multiple reg read.
- */
diff --git a/os/various/devices_lib/lsm6ds0.c b/os/various/devices_lib/mems/lsm6ds0.c
index 304b340..da67f12 100644
--- a/os/various/devices_lib/lsm6ds0.c
+++ b/os/various/devices_lib/mems/lsm6ds0.c
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -35,11 +37,8 @@
#include "ch.h"
#include "hal.h"
-#include "play.h"
#include "lsm6ds0.h"
-#if (ACCEL_USE_LSM6DS0) || (GYRO_USE_LSM6DS0) || defined(__DOXYGEN__)
-
/*===========================================================================*/
/* Driver local definitions. */
/*===========================================================================*/
@@ -117,7 +116,7 @@ void lsm6ds0WriteRegister(I2CDriver *i2cp, uint8_t sad, uint8_t sub,
/* Reserved register must not be written, according to the datasheet
* this could permanently damage the device.
*/
- chDbgAssert(FALSE, "lsm6ds0WriteRegister(), #1", "reserved register");
+ chDbgAssert(FALSE, "lsm6ds0WriteRegister(), reserved register");
case LSM6DS0_SUB_WHO_AM_I:
case LSM6DS0_SUB_INT_GEN_SRC_G:
case LSM6DS0_SUB_OUT_TEMP_L:
@@ -182,5 +181,4 @@ void lsm6ds0WriteRegister(I2CDriver *i2cp, uint8_t sad, uint8_t sub,
}
}
-#endif /* (ACCEL_USE_LSM6DS0) || (GYRO_USE_LSM6DS0) */
/** @} */
diff --git a/os/various/devices_lib/lsm6ds0.h b/os/various/devices_lib/mems/lsm6ds0.h
index 9f27e1b..57e2057 100644
--- a/os/various/devices_lib/lsm6ds0.h
+++ b/os/various/devices_lib/mems/lsm6ds0.h
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -34,12 +36,10 @@
#ifndef _LSM6DS0_H_
#define _LSM6DS0_H_
-#if (ACCEL_USE_LSM6DS0) || (GYRO_USE_LSM6DS0) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
-#if (PLAY_USE_FLOAT) || defined(__DOXYGEN__)
#define LSM6DS0_ACC_SENS_2G ((float)1671.095f) /*!< Accelerometer sensitivity with 2 G full scale [LSB * s^2 / m] */
#define LSM6DS0_ACC_SENS_4G ((float)835.547f) /*!< Accelerometer sensitivity with 4 G full scale [LSB * s^2 / m] */
#define LSM6DS0_ACC_SENS_8G ((float)417.774) /*!< Accelerometer sensitivity with 8 G full scale [LSB * s^2 / m] */
@@ -48,8 +48,6 @@
#define LSM6DS0_GYRO_SENS_245DPS ((float)114.286f) /*!< Gyroscope sensitivity with 245 dps full scale [LSB * s / °] */
#define LSM6DS0_GYRO_SENS_500DPS ((float)57.143f) /*!< Gyroscope sensitivity with 500 dps full scale [LSB * s / °] */
#define LSM6DS0_GYRO_SENS_2000DPS ((float)14.286f) /*!< Gyroscope sensitivity with 2000 dps full scale [LSB * s / °] */
-
-#endif /* PLAY_USE_FLOAT */
/**
* @name LSM6DS0 register names
* @{
@@ -479,7 +477,6 @@ extern "C" {
}
#endif
-#endif /* (ACCEL_USE_LSM6DS0) || (GYRO_USE_LSM6DS0) */
#endif /* _LSM6DS0_H_ */
/** @} */
diff --git a/os/various/devices_lib/max7219.c b/os/various/devices_lib/others/max7219.c
index b15699e..0e51167 100644
--- a/os/various/devices_lib/max7219.c
+++ b/os/various/devices_lib/others/max7219.c
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -21,7 +21,9 @@
Special thanks to Giovanni Di Sirio for teachings, his moral support and
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
- Please refer to ChibiOS/RT license before use it.
+ Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -35,10 +37,8 @@
#include "ch.h"
#include "hal.h"
-#include "play.h"
#include "max7219.h"
-#if (PLAY_USE_MAX7219) || defined (__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
/*===========================================================================*/
@@ -91,5 +91,4 @@ void max7219WriteRegister(SPIDriver *spip, uint16_t adr, uint8_t data) {
spiUnselect(spip);
}
}
-#endif /* PLAY_USE_MAX7219 */
/** @} */
diff --git a/os/various/devices_lib/max7219.h b/os/various/devices_lib/others/max7219.h
index 80524be..f2bbbdf 100644
--- a/os/various/devices_lib/max7219.h
+++ b/os/various/devices_lib/others/max7219.h
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -34,7 +36,6 @@
#ifndef _MAX7219_H_
#define _MAX7219_H_
-#if (PLAY_USE_MAX7219) || defined (__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
@@ -180,7 +181,6 @@ extern "C" {
#ifdef __cplusplus
}
#endif
-#endif /* PLAY_USE_MAX7219 */
#endif /* _MAX7219_H_ */
/** @} */
diff --git a/os/various/devices_lib/nrf24l01.c b/os/various/devices_lib/rf/nrf24l01.c
index 34d8bff..f526fbe 100644
--- a/os/various/devices_lib/nrf24l01.c
+++ b/os/various/devices_lib/rf/nrf24l01.c
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -21,7 +21,9 @@
Special thanks to Giovanni Di Sirio for teachings, his moral support and
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
- Please refer to ChibiOS/RT license before use it.
+ Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -35,10 +37,8 @@
#include "ch.h"
#include "hal.h"
-#include "play.h"
#include "nrf24l01.h"
-#if (RF_USE_NRF24L01) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
/*===========================================================================*/
@@ -123,7 +123,7 @@ NRF24L01_status_t nrf24l01WriteRegister(SPIDriver *spip, uint8_t reg,
/* Reserved register must not be written, according to the datasheet
* this could permanently damage the device.
*/
- chDbgAssert(FALSE, "lg3d20WriteRegister(), #1", "reserved register");
+ chDbgAssert(FALSE, "lg3d20WriteRegister(), reserved register");
case NRF24L01_AD_OBSERVE_TX:
case NRF24L01_AD_CD:
case NRF24L01_AD_RX_ADDR_P0:
@@ -182,7 +182,7 @@ NRF24L01_status_t nrf24l01WriteAddress(SPIDriver *spip, uint8_t reg,
unsigned i;
if(addlen > NRF24L01_MAX_ADD_LENGHT) {
- chDbgAssert(FALSE, "nrf24l01WriteAddress(), #1", "wrong address length");
+ chDbgAssert(FALSE, "nrf24l01WriteAddress(), wrong address length");
return 0;
}
txbuf[0] = (NRF24L01_CMD_WRITE | reg);
@@ -197,7 +197,7 @@ NRF24L01_status_t nrf24l01WriteAddress(SPIDriver *spip, uint8_t reg,
/* Reserved register must not be written, according to the datasheet
* this could permanently damage the device.
*/
- chDbgAssert(FALSE, "nrf24l01WriteAddress(), #1", "reserved register");
+ chDbgAssert(FALSE, "nrf24l01WriteAddress(), reserved register");
case NRF24L01_AD_OBSERVE_TX:
case NRF24L01_AD_CD:
case NRF24L01_AD_CONFIG:
@@ -436,6 +436,5 @@ NRF24L01_status_t nrf24l01WriteTxPlNoAck(SPIDriver *spip, uint8_t paylen,
return status;
}
#endif /* NRF24L01_USE_FEATURE */
-#endif /* RF_USE_NRF24L01 */
/** @} */
diff --git a/os/various/devices_lib/nrf24l01.h b/os/various/devices_lib/rf/nrf24l01.h
index 7112b9f..86ba127 100644
--- a/os/various/devices_lib/nrf24l01.h
+++ b/os/various/devices_lib/rf/nrf24l01.h
@@ -1,6 +1,6 @@
/*
- Pretty LAYer for ChibiOS/RT - Copyright (C) 2014 Rocco Marco Guglielmi
-
+ Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 Rocco Marco Guglielmi
+
This file is part of PLAY for ChibiOS/RT.
PLAY is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
friendship. Note that some or every piece of this file could be part of
the ChibiOS project that is intellectual property of Giovanni Di Sirio.
Please refer to ChibiOS/RT license before use this file.
+
+ For suggestion or Bug report - roccomarco.guglielmi@playembedded.org
*/
/**
@@ -34,9 +36,6 @@
#ifndef _NRF24L01_H_
#define _NRF24L01_H_
-#include "playconf.h"
-
-#if (RF_USE_NRF24L01) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
@@ -571,7 +570,6 @@ NRF24L01_status_t nrf24l01WriteTxPlNoAck(SPIDriver *spip, uint8_t paylen,
}
#endif
-#endif /* RF_USE_NRF24L01 */
#endif /* _NRF24L01_H_ */
/** @} */