Developer World
Spresense SDK Library v3.3.0-375c679
uconv.h
Go to the documentation of this file.
1/****************************************************************************
2 * modules/include/utils/uconv.h
3 *
4 * Copyright 2020 Sony Semiconductor Solutions Corporation
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 * 3. Neither the name of Sony Semiconductor Solutions Corporation nor
17 * the names of its contributors may be used to endorse or promote
18 * products derived from this software without specific prior written
19 * permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 *
34 ****************************************************************************/
35
36#ifndef __MODULES_INCLUDE_UTILS_UCONV_H
37#define __MODULES_INCLUDE_UTILS_UCONV_H
38
47/****************************************************************************
48 * Included Files
49 ****************************************************************************/
50
51#include <stdint.h>
52
53#ifdef __cplusplus
54#define EXTERN extern "C"
55extern "C"
56{
57#else
58#define EXTERN extern
59#endif
60
61/****************************************************************************
62 * Public Function Prototypes
63 ****************************************************************************/
64
85int uconv_utf8_to_ucs2(int src_size, uint8_t *src,
86 int dst_size, uint16_t *dst);
87
106int uconv_ucs2_to_utf8(int src_size, uint16_t *src,
107 int dst_size, uint8_t *dst);
108
113#undef EXTERN
114#ifdef __cplusplus
115}
116#endif
117
118#endif /* __MODULES_INCLUDE_UTILS_UCONV_H */
int uconv_ucs2_to_utf8(int src_size, uint16_t *src, int dst_size, uint8_t *dst)
int uconv_utf8_to_ucs2(int src_size, uint8_t *src, int dst_size, uint16_t *dst)