pwm period is now 200us instead of the default 20ms veml6040 config is now AF_BIT | TRIG_BIT

Dependencies:   mbed MMA8451Q USBDevice WakeUp vt100

Fork of afero_node_suntory_2017_06_15 by Orefatoi

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers base64.h Source File

base64.h

Go to the documentation of this file.
00001 /**
00002  * \file base64.h
00003  *
00004  * \brief RFC 1521 base64 encoding/decoding
00005  *
00006  *  Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
00007  *  SPDX-License-Identifier: Apache-2.0
00008  *
00009  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
00010  *  not use this file except in compliance with the License.
00011  *  You may obtain a copy of the License at
00012  *
00013  *  http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  *  Unless required by applicable law or agreed to in writing, software
00016  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00017  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018  *  See the License for the specific language governing permissions and
00019  *  limitations under the License.
00020  *
00021  *  This file is part of mbed TLS (https://tls.mbed.org)
00022  */
00023 #ifndef MBEDTLS_BASE64_H
00024 #define MBEDTLS_BASE64_H
00025 
00026 //wsugi #include <stddef.h>
00027 #include "mbed.h" //wsugi
00028 
00029 #define MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL               -0x002A  /**< Output buffer too small. */
00030 #define MBEDTLS_ERR_BASE64_INVALID_CHARACTER              -0x002C  /**< Invalid character in input. */
00031 
00032 #ifdef __cplusplus
00033 //wsugi extern "C" {
00034 #endif
00035 
00036 /**
00037  * \brief          Encode a buffer into base64 format
00038  *
00039  * \param dst      destination buffer
00040  * \param dlen     size of the destination buffer
00041  * \param olen     number of bytes written
00042  * \param src      source buffer
00043  * \param slen     amount of data to be encoded
00044  *
00045  * \return         0 if successful, or MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL.
00046  *                 *olen is always updated to reflect the amount
00047  *                 of data that has (or would have) been written.
00048  *                 If that length cannot be represented, then no data is
00049  *                 written to the buffer and *olen is set to the maximum
00050  *                 length representable as a size_t.
00051  *
00052  * \note           Call this function with dlen = 0 to obtain the
00053  *                 required buffer size in *olen
00054  */
00055 int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen,
00056                    const unsigned char *src, size_t slen );
00057 
00058 /**
00059  * \brief          Decode a base64-formatted buffer
00060  *
00061  * \param dst      destination buffer (can be NULL for checking size)
00062  * \param dlen     size of the destination buffer
00063  * \param olen     number of bytes written
00064  * \param src      source buffer
00065  * \param slen     amount of data to be decoded
00066  *
00067  * \return         0 if successful, MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL, or
00068  *                 MBEDTLS_ERR_BASE64_INVALID_CHARACTER if the input data is
00069  *                 not correct. *olen is always updated to reflect the amount
00070  *                 of data that has (or would have) been written.
00071  *
00072  * \note           Call this function with *dst = NULL or dlen = 0 to obtain
00073  *                 the required buffer size in *olen
00074  */
00075 int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen,
00076                    const unsigned char *src, size_t slen );
00077 
00078 /**
00079  * \brief          Checkup routine
00080  *
00081  * \return         0 if successful, or 1 if the test failed
00082  */
00083 int mbedtls_base64_self_test( int verbose );
00084 
00085 #ifdef __cplusplus
00086 //wsugi }
00087 #endif
00088 
00089 #endif /* base64.h */