File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed
hal/tests/UNITTESTS/doubles Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,15 @@ target_compile_definitions(mbed-stubs-hal
1717 DEVICE_PWMOUT
1818 DEVICE_WATCHDOG
1919 MBED_WDOG_ASSERT=1
20+ DEVICE_ANALOGIN
2021)
2122
2223target_sources (mbed-stubs-hal
2324 PRIVATE
2425 pwmout_api_stub.c
2526 us_ticker_stub.cpp
2627 watchdog_api_stub.c
28+ analogin_api_stub.c
2729)
2830
2931target_link_libraries (mbed-stubs-hal
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021 Arm Limited and affiliates.
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+ #include "hal/analogin_api.h"
18+ #include <stddef.h>
19+
20+ #if DEVICE_ANALOGIN
21+
22+ void analogin_init_direct (analogin_t * obj , const PinMap * pinmap )
23+ {
24+ }
25+
26+ void analogin_init (analogin_t * obj , PinName pin )
27+ {
28+ }
29+
30+ void analogin_free (analogin_t * obj )
31+ {
32+ }
33+
34+ float analogin_read (analogin_t * obj )
35+ {
36+ return 0 ;
37+ }
38+
39+ uint16_t analogin_read_u16 (analogin_t * obj )
40+ {
41+ return 0 ;
42+ }
43+
44+ const PinMap * analogin_pinmap (void )
45+ {
46+ return NULL ;
47+ }
48+
49+ #endif // DEVICE_ANALOGIN
You can’t perform that action at this time.
0 commit comments