1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20 #include <stddef.h>
21 #include "nimble/nimble_npl.h"
22
23 bool
ble_npl_os_started(void)24 ble_npl_os_started(void)
25 {
26 return 0;
27 }
28
29 void *
ble_npl_get_current_task_id(void)30 ble_npl_get_current_task_id(void)
31 {
32 return NULL;
33 }
34
35 void
ble_npl_eventq_init(struct ble_npl_eventq * evq)36 ble_npl_eventq_init(struct ble_npl_eventq *evq)
37 {
38
39 }
40
41 struct ble_npl_event *
ble_npl_eventq_get(struct ble_npl_eventq * evq,ble_npl_time_t tmo)42 ble_npl_eventq_get(struct ble_npl_eventq *evq, ble_npl_time_t tmo)
43 {
44 }
45
46 void
ble_npl_eventq_put(struct ble_npl_eventq * evq,struct ble_npl_event * ev)47 ble_npl_eventq_put(struct ble_npl_eventq *evq, struct ble_npl_event *ev)
48 {
49 }
50
51 void
ble_npl_eventq_remove(struct ble_npl_eventq * evq,struct ble_npl_event * ev)52 ble_npl_eventq_remove(struct ble_npl_eventq *evq,
53 struct ble_npl_event *ev)
54 {
55
56 }
57
58 void
ble_npl_event_run(struct ble_npl_event * ev)59 ble_npl_event_run(struct ble_npl_event *ev)
60 {
61
62 }
63
64 void
ble_npl_event_init(struct ble_npl_event * ev,ble_npl_event_fn * fn,void * arg)65 ble_npl_event_init(struct ble_npl_event *ev, ble_npl_event_fn *fn,
66 void *arg)
67 {
68
69 }
70
ble_npl_event_is_queued(struct ble_npl_event * ev)71 bool ble_npl_event_is_queued(struct ble_npl_event *ev)
72 {
73 return false;
74 }
75
76 void *
ble_npl_event_get_arg(struct ble_npl_event * ev)77 ble_npl_event_get_arg(struct ble_npl_event *ev)
78 {
79 return NULL;
80 }
81
82 void
ble_npl_event_set_arg(struct ble_npl_event * ev,void * arg)83 ble_npl_event_set_arg(struct ble_npl_event *ev, void *arg)
84 {
85
86 }
87
88 ble_npl_error_t
ble_npl_mutex_init(struct ble_npl_mutex * mu)89 ble_npl_mutex_init(struct ble_npl_mutex *mu)
90 {
91 return BLE_NPL_ENOENT;
92 }
93
94 ble_npl_error_t
ble_npl_mutex_pend(struct ble_npl_mutex * mu,ble_npl_time_t timeout)95 ble_npl_mutex_pend(struct ble_npl_mutex *mu, ble_npl_time_t timeout)
96 {
97 return BLE_NPL_ENOENT;
98 }
99
100 ble_npl_error_t
ble_npl_mutex_release(struct ble_npl_mutex * mu)101 ble_npl_mutex_release(struct ble_npl_mutex *mu)
102 {
103 return BLE_NPL_ENOENT;
104 }
105
106 ble_npl_error_t
ble_npl_sem_init(struct ble_npl_sem * sem,uint16_t tokens)107 ble_npl_sem_init(struct ble_npl_sem *sem, uint16_t tokens)
108 {
109 return BLE_NPL_ENOENT;
110 }
111
112 ble_npl_error_t
ble_npl_sem_pend(struct ble_npl_sem * sem,ble_npl_time_t timeout)113 ble_npl_sem_pend(struct ble_npl_sem *sem, ble_npl_time_t timeout)
114 {
115 return BLE_NPL_ENOENT;
116 }
117
118 ble_npl_error_t
ble_npl_sem_release(struct ble_npl_sem * sem)119 ble_npl_sem_release(struct ble_npl_sem *sem)
120 {
121 return BLE_NPL_ENOENT;
122 }
123
124 uint16_t
ble_npl_sem_get_count(struct ble_npl_sem * sem)125 ble_npl_sem_get_count(struct ble_npl_sem *sem)
126 {
127 return 0;
128 }
129
130 void
ble_npl_callout_init(struct ble_npl_callout * c,struct ble_npl_eventq * evq,ble_npl_event_fn * ev_cb,void * ev_arg)131 ble_npl_callout_init(struct ble_npl_callout *c, struct ble_npl_eventq *evq,
132 ble_npl_event_fn *ev_cb, void *ev_arg)
133 {
134 }
135
136 ble_npl_error_t
ble_npl_callout_reset(struct ble_npl_callout * c,ble_npl_time_t ticks)137 ble_npl_callout_reset(struct ble_npl_callout *c, ble_npl_time_t ticks)
138 {
139 return BLE_NPL_ENOENT;
140 }
141
142 void
ble_npl_callout_stop(struct ble_npl_callout * co)143 ble_npl_callout_stop(struct ble_npl_callout *co)
144 {
145
146 }
147
148 bool
ble_npl_callout_is_active(struct ble_npl_callout * c)149 ble_npl_callout_is_active(struct ble_npl_callout *c)
150 {
151 return false;
152 }
153
154 ble_npl_time_t
ble_npl_callout_get_ticks(struct ble_npl_callout * co)155 ble_npl_callout_get_ticks(struct ble_npl_callout *co)
156 {
157 return 0;
158 }
159
160 uint32_t
ble_npl_time_get(void)161 ble_npl_time_get(void)
162 {
163 return 0;
164 }
165
166 ble_npl_error_t
ble_npl_time_ms_to_ticks(uint32_t ms,ble_npl_time_t * out_ticks)167 ble_npl_time_ms_to_ticks(uint32_t ms, ble_npl_time_t *out_ticks)
168 {
169 return BLE_NPL_ENOENT;
170 }
171
172 ble_npl_error_t
ble_npl_time_ticks_to_ms(ble_npl_time_t ticks,uint32_t * out_ms)173 ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms)
174 {
175 return BLE_NPL_ENOENT;
176 }
177
178 ble_npl_time_t
ble_npl_time_ms_to_ticks32(uint32_t ms)179 ble_npl_time_ms_to_ticks32(uint32_t ms)
180 {
181 return 0;
182 }
183
184 uint32_t
ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks)185 ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks)
186 {
187 return 0;
188 }
189
190 uint32_t
ble_npl_hw_enter_critical(void)191 ble_npl_hw_enter_critical(void)
192 {
193 return 0;
194 }
195
196 void
ble_npl_hw_exit_critical(uint32_t ctx)197 ble_npl_hw_exit_critical(uint32_t ctx)
198 {
199
200 }
201