![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466
mbed-os/UNITTESTS/stubs/ATHandler_stub.h@3:f3764f852aa8, 2018-10-11 (annotated)
- Committer:
- kadonotakashi
- Date:
- Thu Oct 11 02:27:46 2018 +0000
- Revision:
- 3:f3764f852aa8
- Parent:
- 0:8fdf9a60065b
Nucreo 446 + SSD1331 test version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kadonotakashi | 0:8fdf9a60065b | 1 | /* |
kadonotakashi | 0:8fdf9a60065b | 2 | * Copyright (c) , Arm Limited and affiliates. |
kadonotakashi | 0:8fdf9a60065b | 3 | * SPDX-License-Identifier: Apache-2.0 |
kadonotakashi | 0:8fdf9a60065b | 4 | * |
kadonotakashi | 0:8fdf9a60065b | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
kadonotakashi | 0:8fdf9a60065b | 6 | * you may not use this file except in compliance with the License. |
kadonotakashi | 0:8fdf9a60065b | 7 | * You may obtain a copy of the License at |
kadonotakashi | 0:8fdf9a60065b | 8 | * |
kadonotakashi | 0:8fdf9a60065b | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
kadonotakashi | 0:8fdf9a60065b | 10 | * |
kadonotakashi | 0:8fdf9a60065b | 11 | * Unless required by applicable law or agreed to in writing, software |
kadonotakashi | 0:8fdf9a60065b | 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
kadonotakashi | 0:8fdf9a60065b | 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
kadonotakashi | 0:8fdf9a60065b | 14 | * See the License for the specific language governing permissions and |
kadonotakashi | 0:8fdf9a60065b | 15 | * limitations under the License. |
kadonotakashi | 0:8fdf9a60065b | 16 | */ |
kadonotakashi | 0:8fdf9a60065b | 17 | |
kadonotakashi | 0:8fdf9a60065b | 18 | #include "stdint.h" |
kadonotakashi | 0:8fdf9a60065b | 19 | #include "stdbool.h" |
kadonotakashi | 0:8fdf9a60065b | 20 | #include <cstddef> |
kadonotakashi | 0:8fdf9a60065b | 21 | #include "nsapi_types.h" |
kadonotakashi | 0:8fdf9a60065b | 22 | #include "ATHandler.h" |
kadonotakashi | 0:8fdf9a60065b | 23 | #include "FileHandle_stub.h" |
kadonotakashi | 0:8fdf9a60065b | 24 | #include "Callback.h" |
kadonotakashi | 0:8fdf9a60065b | 25 | |
kadonotakashi | 0:8fdf9a60065b | 26 | #ifndef __AT_HANDLER_STUB_H__ |
kadonotakashi | 0:8fdf9a60065b | 27 | #define __AT_HANDLER_STUB_H__ |
kadonotakashi | 0:8fdf9a60065b | 28 | |
kadonotakashi | 0:8fdf9a60065b | 29 | static const int kRead_string_table_size = 100; |
kadonotakashi | 0:8fdf9a60065b | 30 | static const int kRead_int_table_size = 100; |
kadonotakashi | 0:8fdf9a60065b | 31 | static const int kResp_stop_count_default = 100; |
kadonotakashi | 0:8fdf9a60065b | 32 | // set reference count to -909 to separate it from zero so we can test that ATHandler is really deleted. |
kadonotakashi | 0:8fdf9a60065b | 33 | static const int kATHandler_destructor_ref_ount = -909; |
kadonotakashi | 0:8fdf9a60065b | 34 | |
kadonotakashi | 0:8fdf9a60065b | 35 | namespace ATHandler_stub { |
kadonotakashi | 0:8fdf9a60065b | 36 | extern nsapi_error_t nsapi_error_value; |
kadonotakashi | 0:8fdf9a60065b | 37 | extern uint8_t nsapi_error_ok_counter; |
kadonotakashi | 0:8fdf9a60065b | 38 | extern int int_value; |
kadonotakashi | 0:8fdf9a60065b | 39 | extern int ref_count; |
kadonotakashi | 0:8fdf9a60065b | 40 | extern int timeout; |
kadonotakashi | 0:8fdf9a60065b | 41 | extern bool default_timeout; |
kadonotakashi | 0:8fdf9a60065b | 42 | extern bool debug_on; |
kadonotakashi | 0:8fdf9a60065b | 43 | extern ssize_t ssize_value; |
kadonotakashi | 0:8fdf9a60065b | 44 | extern const char *read_string_value; |
kadonotakashi | 0:8fdf9a60065b | 45 | extern size_t size_value; |
kadonotakashi | 0:8fdf9a60065b | 46 | extern size_t return_given_size; |
kadonotakashi | 0:8fdf9a60065b | 47 | extern bool bool_value; |
kadonotakashi | 0:8fdf9a60065b | 48 | extern uint8_t resp_info_true_counter; |
kadonotakashi | 0:8fdf9a60065b | 49 | extern uint8_t info_elem_true_counter; |
kadonotakashi | 0:8fdf9a60065b | 50 | extern uint8_t uint8_value; |
kadonotakashi | 0:8fdf9a60065b | 51 | extern mbed::FileHandle_stub *fh_value; |
kadonotakashi | 0:8fdf9a60065b | 52 | extern mbed::device_err_t device_err_value; |
kadonotakashi | 0:8fdf9a60065b | 53 | extern mbed::Callback<void()> callback; |
kadonotakashi | 0:8fdf9a60065b | 54 | extern bool call_immediately; |
kadonotakashi | 0:8fdf9a60065b | 55 | extern const char *read_string_table[kRead_string_table_size]; |
kadonotakashi | 0:8fdf9a60065b | 56 | extern int read_string_index; |
kadonotakashi | 0:8fdf9a60065b | 57 | extern int int_valid_count_table[kRead_int_table_size]; |
kadonotakashi | 0:8fdf9a60065b | 58 | extern int int_count; |
kadonotakashi | 0:8fdf9a60065b | 59 | extern int resp_stop_success_count; |
kadonotakashi | 0:8fdf9a60065b | 60 | } |
kadonotakashi | 0:8fdf9a60065b | 61 | |
kadonotakashi | 0:8fdf9a60065b | 62 | #endif |