File tree Expand file tree Collapse file tree 21 files changed +332
-20
lines changed
targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS Expand file tree Collapse file tree 21 files changed +332
-20
lines changed Original file line number Diff line number Diff line change 1515 */
1616#include <stddef.h>
1717#include "us_ticker_api.h"
18+ #include "us_ticker_defines.h"
1819#include "PeripheralNames.h"
1920#include "fsl_pit.h"
2021#include "fsl_clock_config.h"
@@ -81,9 +82,9 @@ void us_ticker_init(void)
8182 *
8283 * @return The current timer's counter value in ticks
8384 */
84- uint32_t us_ticker_read ()
85+ uint32_t ( us_ticker_read ) ()
8586{
86- return ~( PIT_GetCurrentTimerCount ( PIT , kPIT_Chnl_1 ) );
87+ return us_ticker_read ( );
8788}
8889
8990/** Disable us ticker interrupt
Original file line number Diff line number Diff line change 1+ /* mbed Microcontroller Library
2+ * Copyright (c) 2006-2019 ARM Limited
3+ * SPDX-License-Identifier: Apache-2.0
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ * See the License for the specific language governing permissions and
15+ * limitations under the License.
16+ */
17+ #ifndef _FSL_US_TICKER_DEFINES_H_
18+ #define _FSL_US_TICKER_DEFINES_H_
19+
20+ #include "fsl_pit.h"
21+
22+ #define US_TICKER_PERIOD_NUM 1
23+ #define US_TICKER_PERIOD_DEN 1
24+
25+ #define US_TICKER_MASK 0xFFFFFFFF
26+
27+ /* Macro-optimised form of us_ticker_read */
28+ #define us_ticker_read () (~(PIT_GetCurrentTimerCount(PIT, kPIT_Chnl_1)))
29+
30+ #endif /* _FSL_US_TICKER_DEFINES_H_ */
Original file line number Diff line number Diff line change 1515 */
1616#include <stddef.h>
1717#include "us_ticker_api.h"
18+ #include "us_ticker_defines.h"
1819#include "PeripheralNames.h"
1920#include "fsl_pit.h"
2021#include "fsl_clock_config.h"
@@ -81,9 +82,9 @@ void us_ticker_init(void)
8182 *
8283 * @return The current timer's counter value in ticks
8384 */
84- uint32_t us_ticker_read ()
85+ uint32_t ( us_ticker_read ) ()
8586{
86- return ~( PIT_GetCurrentTimerCount ( PIT , kPIT_Chnl_1 ) );
87+ return us_ticker_read ( );
8788}
8889
8990/** Disable us ticker interrupt
Original file line number Diff line number Diff line change 1+ /* mbed Microcontroller Library
2+ * Copyright (c) 2006-2019 ARM Limited
3+ * SPDX-License-Identifier: Apache-2.0
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ * See the License for the specific language governing permissions and
15+ * limitations under the License.
16+ */
17+ #ifndef _FSL_US_TICKER_DEFINES_H_
18+ #define _FSL_US_TICKER_DEFINES_H_
19+
20+ #include "fsl_pit.h"
21+
22+ #define US_TICKER_PERIOD_NUM 1
23+ #define US_TICKER_PERIOD_DEN 1
24+
25+ #define US_TICKER_MASK 0xFFFFFFFF
26+
27+ /* Macro-optimised form of us_ticker_read */
28+ #define us_ticker_read () (~(PIT_GetCurrentTimerCount(PIT, kPIT_Chnl_1)))
29+
30+ #endif /* _FSL_US_TICKER_DEFINES_H_ */
Original file line number Diff line number Diff line change 1515 */
1616#include <stddef.h>
1717#include "us_ticker_api.h"
18+ #include "us_ticker_defines.h"
1819#include "PeripheralNames.h"
1920#include "fsl_pit.h"
2021#include "fsl_tpm.h"
@@ -95,9 +96,9 @@ void us_ticker_init(void)
9596}
9697
9798
98- uint32_t us_ticker_read ()
99+ uint32_t ( us_ticker_read ) ()
99100{
100- return ~( PIT_GetCurrentTimerCount ( PIT , kPIT_Chnl_1 ) );
101+ return us_ticker_read ( );
101102}
102103
103104void us_ticker_disable_interrupt (void )
Original file line number Diff line number Diff line change 1+ /* mbed Microcontroller Library
2+ * Copyright (c) 2006-2019 ARM Limited
3+ * SPDX-License-Identifier: Apache-2.0
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ * See the License for the specific language governing permissions and
15+ * limitations under the License.
16+ */
17+ #ifndef _FSL_US_TICKER_DEFINES_H_
18+ #define _FSL_US_TICKER_DEFINES_H_
19+
20+ #include "fsl_pit.h"
21+
22+ #define US_TICKER_PERIOD_NUM 1
23+ #define US_TICKER_PERIOD_DEN 1
24+
25+ #define US_TICKER_MASK 0xFFFFFFFF
26+
27+ /* Macro-optimised form of us_ticker_read */
28+ #define us_ticker_read () (~(PIT_GetCurrentTimerCount(PIT, kPIT_Chnl_1)))
29+
30+ #endif /* _FSL_US_TICKER_DEFINES_H_ */
Original file line number Diff line number Diff line change 1515 */
1616#include <stddef.h>
1717#include "us_ticker_api.h"
18+ #include "us_ticker_defines.h"
1819#include "PeripheralNames.h"
1920#include "fsl_pit.h"
2021#include "fsl_tpm.h"
@@ -95,9 +96,9 @@ void us_ticker_init(void)
9596}
9697
9798
98- uint32_t us_ticker_read ()
99+ uint32_t ( us_ticker_read ) ()
99100{
100- return ~( PIT_GetCurrentTimerCount ( PIT , kPIT_Chnl_1 ) );
101+ return us_ticker_read ( );
101102}
102103
103104void us_ticker_disable_interrupt (void )
Original file line number Diff line number Diff line change 1+ /* mbed Microcontroller Library
2+ * Copyright (c) 2006-2019 ARM Limited
3+ * SPDX-License-Identifier: Apache-2.0
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ * See the License for the specific language governing permissions and
15+ * limitations under the License.
16+ */
17+ #ifndef _FSL_US_TICKER_DEFINES_H_
18+ #define _FSL_US_TICKER_DEFINES_H_
19+
20+ #include "fsl_pit.h"
21+
22+ #define US_TICKER_PERIOD_NUM 1
23+ #define US_TICKER_PERIOD_DEN 1
24+
25+ #define US_TICKER_MASK 0xFFFFFFFF
26+
27+ /* Macro-optimised form of us_ticker_read */
28+ #define us_ticker_read () (~(PIT_GetCurrentTimerCount(PIT, kPIT_Chnl_1)))
29+
30+ #endif /* _FSL_US_TICKER_DEFINES_H_ */
Original file line number Diff line number Diff line change 1515 */
1616#include <stddef.h>
1717#include "us_ticker_api.h"
18+ #include "us_ticker_defines.h"
1819#include "PeripheralNames.h"
1920#include "fsl_pit.h"
2021#include "fsl_clock_config.h"
@@ -81,9 +82,9 @@ void us_ticker_init(void)
8182 *
8283 * @return The current timer's counter value in ticks
8384 */
84- uint32_t us_ticker_read ()
85+ uint32_t ( us_ticker_read ) ()
8586{
86- return ~( PIT_GetCurrentTimerCount ( PIT , kPIT_Chnl_1 ) );
87+ return us_ticker_read ( );
8788}
8889
8990/** Disable us ticker interrupt
Original file line number Diff line number Diff line change 1+ /* mbed Microcontroller Library
2+ * Copyright (c) 2006-2019 ARM Limited
3+ * SPDX-License-Identifier: Apache-2.0
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ * See the License for the specific language governing permissions and
15+ * limitations under the License.
16+ */
17+ #ifndef _FSL_US_TICKER_DEFINES_H_
18+ #define _FSL_US_TICKER_DEFINES_H_
19+
20+ #include "fsl_pit.h"
21+
22+ #define US_TICKER_PERIOD_NUM 1
23+ #define US_TICKER_PERIOD_DEN 1
24+
25+ #define US_TICKER_MASK 0xFFFFFFFF
26+
27+ /* Macro-optimised form of us_ticker_read */
28+ #define us_ticker_read () (~(PIT_GetCurrentTimerCount(PIT, kPIT_Chnl_1)))
29+
30+ #endif /* _FSL_US_TICKER_DEFINES_H_ */
You can’t perform that action at this time.
0 commit comments