Based on SX1276Lib. Simplified and targeted for Modtronix inAir modules. All pins can now be specified to use interrupts or general purpose I/O pins.
Diff: inair_default_config.h
- Revision:
- 1:64a9c4a03244
- Child:
- 7:4d242a6ca693
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inair_default_config.h Sun Aug 30 09:39:25 2015 +1000 @@ -0,0 +1,62 @@ +/** + * File: inair_default_defines.h + * + * Author: Modtronix Engineering - www.modtronix.com + * + * Description: + * + * Software License Agreement: + * This software has been written or modified by Modtronix Engineering. The code + * may be modified and can be used free of charge for commercial and non commercial + * applications. If this is modified software, any license conditions from original + * software also apply. Any redistribution must include reference to 'Modtronix + * Engineering' and web link(www.modtronix.com) in the file header. + * + * THIS SOFTWARE IS PROVIDED IN AN 'AS IS' CONDITION. NO WARRANTIES, WHETHER EXPRESS, + * IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE + * COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR + * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. + */ +#ifndef MODTRONIX_INAIR_INAIR_DEFAULT_CONFIG_H_ +#define MODTRONIX_INAIR_INAIR_DEFAULT_CONFIG_H_ + +//This file is used to configure the "modtronix_inAir" library. The recommended way to change the defines +//in this file is to create a copy of this file in your main project folder. Name it "inair_config.h". +//To use the defines from this new file, comment the following line. This makes it easier when +//upgrading to newer version of this library, seeing that this file with modifications will be +//overwritten. After upgrade, all that has to be done is to uncomment following line again. +#define USE_CUSTOM_INAIR_CONFIG //Uncomment this line after creating "inair_config.h" in project + +#if defined(USE_CUSTOM_INAIR_CONFIG) +#include "inair_config.h" +#else +//To use custom config, uncomment "USE_CUSTOM_INAIR_CONFIG" define above, and create "inair_config.h" file +//#warning "Using default configuration for 'modtronix_inAir' library!" +#endif + +// Copy from here to custom inair_defines.h file ////////////////////////////// + +//When selecting "Non Interrupt" based DIO0, following times were measured: +// - Measuring time DIO0 pin stays high, indicates how long code takes to get to "Clear Irq" in OnDio0Irq(). DIO0 pin +// stays high for about 20-40uS with interrupts disabled. Is about 18uS when interrupts enabled. +#if !defined(INAIR_DIO0_IS_INTERRUPT) +#define INAIR_DIO0_IS_INTERRUPT 0 +#endif + +#if !defined(INAIR_DIO1_IS_INTERRUPT) +#define INAIR_DIO1_IS_INTERRUPT 0 +#endif + +#if !defined(INAIR_DIO2_IS_INTERRUPT) +#define INAIR_DIO2_IS_INTERRUPT 0 +#endif + +#if !defined(INAIR_DIO3_IS_INTERRUPT) +#define INAIR_DIO3_IS_INTERRUPT 0 +#endif + + +// End of contents to copy to custom inair_defines.h file ///////////////////// + +#endif /* MODTRONIX_INAIR_INAIR_DEFAULT_CONFIG_H_ */