Skip to content

Commit 568feaf

Browse files
author
Michael Schwarcz
committed
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.
1 parent f1e664b commit 568feaf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

hal/mbed_us_ticker_api.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
18+
#include <stddef.h>
1719
#include "hal/us_ticker_api.h"
1820

21+
#if DEVICE_USTICKER
22+
1923
static ticker_event_queue_t events = { 0 };
2024

2125
static ticker_irq_handler_type irq_handler = ticker_irq_handler;
@@ -56,3 +60,12 @@ void us_ticker_irq_handler(void)
5660
irq_handler(&us_data);
5761
}
5862
}
63+
64+
#else
65+
66+
const ticker_data_t *get_us_ticker_data(void)
67+
{
68+
return NULL;
69+
}
70+
71+
#endif // DEVICE_USTICKER

0 commit comments

Comments
 (0)