Embedded SDK
Embedded SDK
swap_utils.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * (c) 2023 Ledger
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ********************************************************************************/
16 #pragma once
17 
18 #include <stddef.h>
19 #include <stdbool.h>
20 #include <stdint.h>
21 
22 extern volatile bool G_called_from_swap;
23 extern volatile bool G_swap_response_ready;
24 
25 bool swap_str_to_u64(const uint8_t *src, size_t length, uint64_t *result);
26 bool swap_parse_config(const uint8_t *config,
27  uint8_t config_len,
28  char *ticker,
29  uint8_t ticker_buf_len,
30  uint8_t *decimals);
volatile bool G_called_from_swap
bool swap_parse_config(const uint8_t *config, uint8_t config_len, char *ticker, uint8_t ticker_buf_len, uint8_t *decimals)
volatile bool G_swap_response_ready
bool swap_str_to_u64(const uint8_t *src, size_t length, uint64_t *result)
unsigned char uint8_t
Definition: usbd_conf.h:53