Merge pull request #10155 from kfnta/us_ticker

Remove dependency on us_ticker HAL apis for non USTICKER targets
pull/9904/head
Cruz Monrreal 2019-03-27 00:22:49 -05:00 committed by GitHub
commit fcf4999098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 7 deletions

View File

@ -14,8 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stddef.h>
#include "hal/us_ticker_api.h"
#if DEVICE_USTICKER
static ticker_event_queue_t events = { 0 };
static ticker_irq_handler_type irq_handler = ticker_irq_handler;
@ -56,3 +60,12 @@ void us_ticker_irq_handler(void)
irq_handler(&us_data);
}
}
#else
const ticker_data_t *get_us_ticker_data(void)
{
return NULL;
}
#endif // DEVICE_USTICKER

View File

@ -18,6 +18,8 @@
#include "fsl_ctimer.h"
#include "PeripheralNames.h"
#if DEVICE_USTICKER
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
#define CTIMER CTIMER0
#define CTIMER_IRQn CTIMER0_IRQn
@ -117,3 +119,6 @@ void us_ticker_free(void)
NVIC_DisableIRQ(CTIMER_IRQn);
us_ticker_inited = false;
}
#endif // DEVICE_USTICKER

View File

@ -663,7 +663,8 @@
"STDIO_MESSAGES",
"FLASH",
"MPU",
"USBDEVICE"
"USBDEVICE",
"USTICKER"
],
"release_versions": ["2", "5"],
"device_name": "LPC1768",
@ -872,7 +873,8 @@
"SPI",
"SPISLAVE",
"STDIO_MESSAGES",
"MPU"
"MPU",
"USTICKER"
],
"device_name": "LPC4088FBD144",
"overrides": {
@ -5449,7 +5451,8 @@
"SERIAL_FC",
"SLEEP",
"SPI",
"STDIO_MESSAGES"
"STDIO_MESSAGES",
"USTICKER"
],
"release_versions": ["2", "5"]
},
@ -6521,7 +6524,8 @@
"SERIAL",
"SPI",
"SPISLAVE",
"STDIO_MESSAGES"
"STDIO_MESSAGES",
"USTICKER"
],
"release_versions": ["2", "5"]
},
@ -6546,7 +6550,8 @@
"SERIAL",
"SPI",
"SPISLAVE",
"STDIO_MESSAGES"
"STDIO_MESSAGES",
"USTICKER"
],
"release_versions": ["2", "5"]
},
@ -6570,7 +6575,8 @@
"SERIAL",
"SPI",
"SPISLAVE",
"STDIO_MESSAGES"
"STDIO_MESSAGES",
"USTICKER"
],
"release_versions": ["2", "5"]
},
@ -7279,7 +7285,8 @@
"TRNG",
"SPISLAVE",
"802_15_4_PHY",
"MPU"
"MPU",
"USTICKER"
],
"release_versions": ["2", "5"]
},