Remove dependency on us_ticker HAL apis for non USTICKER targets

- Surround mbed_us_ticker_api.c with if DEVICE_USTICKER
- get_us_ticker_data() returns NULL for non-usticker targets.
pull/10155/head
Michael Schwarcz 2019-03-19 12:51:36 +02:00
parent f1e664be82
commit 568feaf7da
1 changed files with 13 additions and 0 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