Merge pull request #12026 from deepak-shreshti/master

Update HAL file to Toshiba's TMPM4G9
pull/12052/head
Martin Kojtal 2019-12-06 15:48:55 +01:00 committed by GitHub
commit 8d246d8ac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 1359 additions and 825 deletions

View File

@ -1,386 +0,0 @@
/**
*******************************************************************************
* @file bsp_rtc.h
* @brief This file provides all the functions prototypes for RTC Class.
* @version V1.0.0.1
* $Date:: 2017-09-01 08:26:38 #$
*
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT.
*
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved
*******************************************************************************
*/
/*------------------------------------------------------------------------------*/
/* Define to prevent recursive inclusion */
/*------------------------------------------------------------------------------*/
#ifndef __BSP_RTC_H
#define __BSP_RTC_H
#ifdef __cplusplus
extern "C" {
#endif
/*------------------------------------------------------------------------------*/
/* Includes */
/*------------------------------------------------------------------------------*/
//#include "txz_sample_def.h"
#include "txz_driver_def.h"
/**
* @addtogroup Example
* @{
*/
/**
* @addtogroup BSP_UTILITIES
* @{
*/
/*------------------------------------------------------------------------------*/
/* Macro Function */
/*------------------------------------------------------------------------------*/
/**
* @addtogroup BSP_UTILITIES_Exported_macro
* @{
*/
/* no define */
/**
* @}
*/ /* End of group BSP_UTILITIES_Exported_macro */
/*------------------------------------------------------------------------------*/
/* Configuration */
/*------------------------------------------------------------------------------*/
/**
* @addtogroup BSP_UTILITIES_Exported_define
* @{
*/
/* no define */
/**
* @}
*/ /* End of group BSP_UTILITIES_Exported_define */
/*------------------------------------------------------------------------------*/
/* Macro Definition */
/*------------------------------------------------------------------------------*/
/**
* @addtogroup BSP_UTILITIES_Exported_define
* @{
*/
/**
* @defgroup RTC_RangeSec Range Second
* @brief Range of Second.
* @brief Range of Second "(RTC_RANGE_SEC_MIN <= Value <= RTC_RANGE_SEC_MAX)".
* @{
*/
#define RTC_RANGE_SEC_MIN ((uint8_t)0x00) /*!< Minimum Value : 0 sec */
#define RTC_RANGE_SEC_MAX ((uint8_t)0x3B) /*!< Maximum Value :59 sec */
/**
* @}
*/ /* End of group RTC_RangeSec */
/**
* @defgroup RTC_RangeMin Range Minute
* @brief Range of Minute.
* @brief Range of Minute "(RTC_RANGE_MIN_MIN <= Value <= RTC_RANGE_MIN_MAX)".
* @{
*/
#define RTC_RANGE_MIN_MIN ((uint8_t)0x00) /*!< Minimum Value : 0 min */
#define RTC_RANGE_MIN_MAX ((uint8_t)0x3B) /*!< Maximum Value :59 min */
/**
* @}
*/ /* End of group RTC_RangeMin */
/**
* @defgroup RTC_AlarmMin Alarm Minute
* @brief Compare/No Compare minute.
* @{
*/
#define RTC_ALARM_MIN_OFF ((uint8_t)0x7F) /*!< No compare. */
#define RTC_ALARM_MIN_ON ((uint8_t)0x00) /*!< Compare. */
/**
* @}
*/ /* End of group RTC_AlarmMin */
/**
* @defgroup RTC_Range24Hour Range 24 Hour
* @brief Range of 24 Hour.
* @brief Range of 24 Hour "(RTC_RANGE_24_HOUR_MIN <= Value <= RTC_RANGE_24_HOUR_MAX)".
* @{
*/
#define RTC_RANGE_24_HOUR_MIN ((uint8_t)0x00) /*!< Minimum Value : 0 hour */
#define RTC_RANGE_24_HOUR_MAX ((uint8_t)0x17) /*!< Maximum Value :23 hour */
/**
* @}
*/ /* End of group RTC_Range24Hour */
/**
* @defgroup RTC_Range12Hour Range 12 Hour
* @brief Range of 12 Hour.
* @brief Range of 12 Hour "(RTC_RANGE_12_HOUR_MIN <= Value <= RTC_RANGE_12_HOUR_MAX)".
* @{
*/
#define RTC_RANGE_12_HOUR_MIN ((uint8_t)0x00) /*!< Minimum Value : 0 hour */
#define RTC_RANGE_12_HOUR_MAX ((uint8_t)0x0B) /*!< Maximum Value :11 hour */
/**
* @}
*/ /* End of group RTC_Range12Hour */
/**
* @defgroup RTC_Meridiem Meridiem
* @brief AM/PM.
* @{
*/
#define RTC_MERIDIEM_AM ((uint8_t)0x00) /*!< A.M. */
#define RTC_MERIDIEM_PM ((uint8_t)0x20) /*!< P.M. */
/**
* @}
*/ /* End of group RTC_Meridiem */
/**
* @defgroup RTC_AlarmHour Alarm Hour
* @brief Compare/No Compare hour.
* @{
*/
#define RTC_ALARM_HOUR_OFF ((uint8_t)0x3F) /*!< No compare. */
#define RTC_ALARM_HOUR_ON ((uint8_t)0x00) /*!< Compare. */
/**
* @}
*/ /* End of group RTC_AlarmHour */
/**
* @defgroup RTC_Day Day Of Week
* @brief Day of week.
* @{
*/
#define RTC_DAY_SUNDAY ((uint8_t)0x00) /*!< Sunday. */
#define RTC_DAY_MONDAY ((uint8_t)0x01) /*!< Monday. */
#define RTC_DAY_TUESDAY ((uint8_t)0x02) /*!< Tuesday. */
#define RTC_DAY_WEDNESDAY ((uint8_t)0x03) /*!< Wednesday. */
#define RTC_DAY_THURSDAY ((uint8_t)0x04) /*!< Thursday. */
#define RTC_DAY_FRIDAY ((uint8_t)0x05) /*!< Friday. */
#define RTC_DAY_SATURDAY ((uint8_t)0x06) /*!< Saturday. */
/**
* @}
*/ /* End of group RTC_Day */
/**
* @defgroup RTC_AlarmDay Alarm Day
* @brief Compare/No Compare day.
* @{
*/
#define RTC_ALARM_DAY_OFF ((uint8_t)0x03) /*!< No compare. */
#define RTC_ALARM_DAY_ON ((uint8_t)0x00) /*!< Compare. */
/**
* @}
*/ /* End of group RTC_AlarmDay */
/**
* @defgroup RTC_RangeDate Range Date
* @brief Range of Date.
* @brief Range of Date "(RTC_RANGE_DATE_MIN <= Value <= RTC_RANGE_DATE_MAX)".
* @{
*/
#define RTC_RANGE_DATE_MIN ((uint8_t)0x00) /*!< Minimum Value :date 00 */
#define RTC_RANGE_DATE_MAX ((uint8_t)0x1F) /*!< Maximum Value :date 31 */
/**
* @}
*/ /* End of group RTC_RangeDate */
/**
* @defgroup RTC_AlarmDate Alarm Date
* @brief Compare/No Compare date.
* @{
*/
#define RTC_ALARM_DATE_OFF ((uint8_t)0x3F) /*!< No compare. */
#define RTC_ALARM_DATE_ON ((uint8_t)0x00) /*!< Compare. */
/**
* @}
*/ /* End of group RTC_AlarmDate */
/**
* @defgroup RTC_Month Month
* @brief Month.
* @{
*/
#define RTC_MONTH_JAN ((uint8_t)0x01) /*!< January. */
#define RTC_MONTH_FEB ((uint8_t)0x02) /*!< February. */
#define RTC_MONTH_MAR ((uint8_t)0x03) /*!< March. */
#define RTC_MONTH_APR ((uint8_t)0x04) /*!< April. */
#define RTC_MONTH_MAY ((uint8_t)0x05) /*!< May. */
#define RTC_MONTH_JUN ((uint8_t)0x06) /*!< June. */
#define RTC_MONTH_JUL ((uint8_t)0x07) /*!< July. */
#define RTC_MONTH_AUG ((uint8_t)0x08) /*!< August. */
#define RTC_MONTH_SEP ((uint8_t)0x09) /*!< September. */
#define RTC_MONTH_OCT ((uint8_t)0x10) /*!< October. */
#define RTC_MONTH_NOV ((uint8_t)0x11) /*!< November. */
#define RTC_MONTH_DEC ((uint8_t)0x12) /*!< December. */
/**
* @}
*/ /* End of group RTC_Month */
/**
* @defgroup BSP_RTC_HourNotation Hour Notation
* @brief 24/12 Hour Notation.
* @{
*/
#define RTC_HOUR_NOTATION_12 ((uint8_t)0x00) /*!< 12-hour notation. */
#define RTC_HOUR_NOTATION_24 ((uint8_t)0x01) /*!< 24-hour notation. */
/**
* @}
*/ /* End of group BSP_RTC_HourNotation */
/**
* @defgroup RTC_RangeYear Range Year
* @brief Range of Year.
* @brief Range of Year "(RTC_RANGE_YEAR_MIN <= Value <= RTC_RANGE_YEAR_MAX)".
* @{
*/
#define RTC_RANGE_YEAR_MIN ((uint8_t)0x00) /*!< Minimum Value :year 00 */
#define RTC_RANGE_YEAR_MAX ((uint8_t)0x63) /*!< Maximum Value :year 99 */
/**
* @}
*/ /* End of group RTC_RangeYear */
/**
* @defgroup RTC_LeapYear Leap Year
* @brief Leap Year.
* @{
*/
#define RTC_LEAP_YEAR_0 ((uint8_t)0x00) /*!< Leap year. */
#define RTC_LEAP_YEAR_1 ((uint8_t)0x01) /*!< 1 year since leap year. */
#define RTC_LEAP_YEAR_2 ((uint8_t)0x02) /*!< 2 years since leap year. */
#define RTC_LEAP_YEAR_3 ((uint8_t)0x03) /*!< 3 years since leap year. */
/**
* @}
*/ /* End of group RTC_LeapYear */
/**
* @defgroup RTC_IntSource Interrupt Source Signal
* @brief Interrupt Source Signal.
* @{
*/
#define RTC_INT_SRC_1HZ ((uint8_t)0x47) /*!< 1 Hz. */
#define RTC_INT_SRC_2HZ ((uint8_t)0xC3) /*!< 2 Hz. */
#define RTC_INT_SRC_4HZ ((uint8_t)0xC5) /*!< 4 Hz. */
#define RTC_INT_SRC_8HZ ((uint8_t)0x01) /*!< 8 Hz. */
#define RTC_INT_SRC_16HZ ((uint8_t)0xC6) /*!< 16 Hz. */
#define RTC_INT_SRC_ALARM ((uint8_t)0xC7) /*!< Alarm. */
/**
* @}
*/ /* End of group RTC_IntSource */
/**
* @}
*/ /* End of group BSP_UTILITIES_Exported_define */
/*------------------------------------------------------------------------------*/
/* Enumerated Type Definition */
/*------------------------------------------------------------------------------*/
/**
* @addtogroup BSP_UTILITIES_Exported_define
* @{
*/
/* no define */
/**
* @}
*/ /* End of group BSP_UTILITIES_Exported_define */
/*------------------------------------------------------------------------------*/
/* Structure Definition */
/*------------------------------------------------------------------------------*/
/**
* @defgroup BSP_UTILITIES_Exported_typedef
* @{
*/
/*----------------------------------*/
/**
* @brief RTC handle structure definenition.
*/
/*----------------------------------*/
typedef struct uart_handle
{
TSB_RTC_TypeDef *p_instance; /*!< Registers base address. */
} rtc_t;
/**
* @}
*/ /* End of group BSP_UTILITIES_Exported_define */
/*------------------------------------------------------------------------------*/
/* Functions */
/*------------------------------------------------------------------------------*/
/**
* @addtogroup BSP_UTILITIES_Exported_functions
* @{
*/
TXZ_Result m4g9_rtc_init(rtc_t *p_obj);
TXZ_Result rtc_deinit(rtc_t *p_obj);
TXZ_Result rtc_enable_int(rtc_t *p_obj);
TXZ_Result rtc_disable_int(rtc_t *p_obj);
TXZ_Result rtc_set_int_source(rtc_t *p_obj, uint8_t src);
TXZ_Result rtc_set_hour_notation(rtc_t *p_obj, uint8_t notation);
TXZ_Result rtc_get_hour_notation(rtc_t *p_obj, uint8_t *p_notation);
/* clock */
TXZ_Result rtc_clock_enable(rtc_t *p_obj);
TXZ_Result rtc_clock_disable(rtc_t *p_obj);
TXZ_Result rtc_clock_reset_counter(rtc_t *p_obj);
TXZ_Result rtc_clock_set_sec(rtc_t *p_obj, uint8_t sec);
TXZ_Result rtc_clock_get_sec(rtc_t *p_obj, uint8_t *p_sec);
TXZ_Result rtc_clock_set_min(rtc_t *p_obj, uint8_t min);
TXZ_Result rtc_clock_get_min(rtc_t *p_obj, uint8_t *p_min);
TXZ_Result rtc_clock_set_hour_24(rtc_t *p_obj, uint8_t hour);
TXZ_Result rtc_clock_get_hour_24(rtc_t *p_obj, uint8_t *p_hour);
TXZ_Result rtc_clock_set_hour_12(rtc_t *p_obj, uint8_t meridiem, uint8_t hour);
TXZ_Result rtc_clock_get_hour_12(rtc_t *p_obj, uint8_t *p_meridiem, uint8_t *p_hour);
TXZ_Result rtc_clock_set_day(rtc_t *p_obj, uint8_t day);
TXZ_Result rtc_clock_get_day(rtc_t *p_obj, uint8_t *p_day);
TXZ_Result rtc_clock_set_date(rtc_t *p_obj, uint8_t date);
TXZ_Result rtc_clock_get_date(rtc_t *p_obj, uint8_t *p_date);
TXZ_Result rtc_clock_set_month(rtc_t *p_obj, uint8_t month);
TXZ_Result rtc_clock_get_month(rtc_t *p_obj, uint8_t *p_month);
TXZ_Result rtc_clock_set_year(rtc_t *p_obj, uint8_t year);
TXZ_Result rtc_clock_get_year(rtc_t *p_obj, uint8_t *p_year);
TXZ_Result rtc_clock_set_leap(rtc_t *p_obj, uint8_t leap);
TXZ_Result rtc_clock_get_leap(rtc_t *p_obj, uint8_t *p_leap);
/* alarm */
TXZ_Result rtc_alarm_enable(rtc_t *p_obj);
TXZ_Result rtc_alarm_disable(rtc_t *p_obj);
TXZ_Result rtc_alarm_reset(rtc_t *p_obj);
TXZ_Result rtc_alarm_set_min(rtc_t *p_obj, uint8_t compare, uint8_t min);
TXZ_Result rtc_alarm_get_min(rtc_t *p_obj, uint8_t *p_compare, uint8_t *p_min);
TXZ_Result rtc_alarm_set_hour_24(rtc_t *p_obj, uint8_t compare, uint8_t hour);
TXZ_Result rtc_alarm_get_hour_24(rtc_t *p_obj, uint8_t *p_compare, uint8_t *p_hour);
TXZ_Result rtc_alarm_set_hour_12(rtc_t *p_obj, uint8_t compare, uint8_t meridiem, uint8_t hour);
TXZ_Result rtc_alarm_get_hour_12(rtc_t *p_obj, uint8_t *p_compare, uint8_t *p_meridiem, uint8_t *p_hour);
TXZ_Result rtc_alarm_set_day(rtc_t *p_obj, uint8_t compare, uint8_t day);
TXZ_Result rtc_alarm_get_day(rtc_t *p_obj, uint8_t *p_compare, uint8_t *p_day);
TXZ_Result rtc_alarm_set_date(rtc_t *p_obj, uint8_t compare, uint8_t date);
TXZ_Result rtc_alarm_get_date(rtc_t *p_obj, uint8_t *p_compare, uint8_t *p_date);
/**
* @}
*/ /* End of group BSP_UTILITIES_Exported_functions */
/**
* @}
*/ /* End of group BSP_UTILITIES */
/**
* @}
*/ /* End of group Sample_Appli */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __BSP_RTC_H */

View File

@ -1,13 +1,35 @@
/** /**
******************************************************************************* *******************************************************************************
* @file adc.h * @file txz_adc.h
* @brief This file provides all the functions prototypes for ADC driver. * @brief This file provides all the functions prototypes for ADC driver.
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-09-12 13:52:12 #$ * $Date:: 2017-09-12 13:52:12 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@ -24,7 +46,7 @@ extern "C" {
/* Includes */ /* Includes */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
#include "txz_driver_def.h" #include "txz_driver_def.h"
#include "adc_ch.h" #include "txz_adc_ch.h"
/** /**
* @addtogroup Periph_Driver Peripheral Driver * @addtogroup Periph_Driver Peripheral Driver
* @{ * @{
@ -160,7 +182,7 @@ typedef enum
}adc_dma_int_t; }adc_dma_int_t;
/*! @enum adc_ain_range_t /*! @enum adc_ain_range_t
@brief Range of AIN Macro Definisiton. @brief Range of AIN Macro Definition.
Range of AIN be set "(ADC_AIN_RANGE_MIN <= Value <= ADC_AIN_RANGE_MAX)". Range of AIN be set "(ADC_AIN_RANGE_MIN <= Value <= ADC_AIN_RANGE_MAX)".
*/ */
typedef enum typedef enum
@ -359,7 +381,7 @@ typedef enum
/*----------------------------------*/ /*----------------------------------*/
/*! @struct adc_clock_t /*! @struct adc_clock_t
@brief Clock information structure definenition. @brief Clock information structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -375,7 +397,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/*! @struct adc_cmpx_t /*! @struct adc_cmpx_t
@brief Clock information structure definenition. @brief Clock information structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -386,12 +408,12 @@ typedef struct
uint32_t CMPBigSml; /*!< Compare Big/Small condition */ uint32_t CMPBigSml; /*!< Compare Big/Small condition */
uint32_t StrReg; /*!< Compare Store register */ uint32_t StrReg; /*!< Compare Store register */
uint32_t ADComp; /*!< ADxCMP0 register data */ uint32_t ADComp; /*!< ADxCMP0 register data */
void (*handle)(uint32_t id, TXZ_Result result); /*!< Notity Compare Done. */ void (*handle)(uint32_t id, TXZ_Result result); /*!< Notify Compare Done. */
} adc_cmpx_t; } adc_cmpx_t;
/*----------------------------------*/ /*----------------------------------*/
/*! @struct adc_initial_setting_t /*! @struct adc_initial_setting_t
@brief Initial setting structure definenition. @brief Initial setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -424,7 +446,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/*! @struct adc_internal_info_t /*! @struct adc_internal_info_t
@brief Driver internal information structure definenition. @brief Driver internal information structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -434,7 +456,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/*! @struct adc_t /*! @struct adc_t
@brief ADC handle structure definenition. @brief ADC handle structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -444,10 +466,10 @@ typedef struct
adc_internal_info_t info; /*!< Driver internal information. */ adc_internal_info_t info; /*!< Driver internal information. */
struct struct
{ {
void (*single)(uint32_t id, TXZ_Result result); /*!< Notity Single Conversion Done. */ void (*single)(uint32_t id, TXZ_Result result); /*!< Notify Single Conversion Done. */
void (*continuity)(uint32_t id, TXZ_Result result); /*!< Notity Continuity Conversion Done. */ void (*continuity)(uint32_t id, TXZ_Result result); /*!< Notify Continuity Conversion Done. */
void (*trigger)(uint32_t id, TXZ_Result result); /*!< Notity Trigger Conversion Done. */ void (*trigger)(uint32_t id, TXZ_Result result); /*!< Notify Trigger Conversion Done. */
void (*highpriority)(uint32_t id, TXZ_Result result); /*!< Notity HighPriority Conversion Done. */ void (*highpriority)(uint32_t id, TXZ_Result result); /*!< Notify HighPriority Conversion Done. */
} handler; /*!< Handler structure. */ } handler; /*!< Handler structure. */
} adc_t; } adc_t;

View File

@ -1,21 +1,43 @@
/** /**
******************************************************************************* *******************************************************************************
* @file adc_ch.h * @file txz_adc_ch.h
* @brief This file provides all the functions prototypes for ADC driver. \n * @brief This file provides all the functions prototypes for ADC driver. \n
* Channel Class. * Channel Class.
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-09-07 13:52:12 #$ * $Date:: 2017-09-07 13:52:12 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Define to prevent recursive inclusion */ /* Define to prevent recursive inclusion */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
#ifndef __ADC_CH_H #ifndef __TXZ_ADC_CH_H
#define __ADC_CH_H #define __TXZ_ADC_CH_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -130,6 +152,6 @@ TXZ_Result adc_ch_get_value(adc_ch_t *p_obj, uint32_t *p_value);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __ADC_CH_H */ #endif /* __TXZ_ADC_CH_H */

View File

@ -1,20 +1,42 @@
/** /**
******************************************************************************* *******************************************************************************
* @file adc_include.h * @file txz_adc_include.h
* @brief This file provides internal common definition. * @brief This file provides internal common definition.
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-09-07 13:52:12 #$ * $Date:: 2017-09-07 13:52:12 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Define to prevent recursive inclusion */ /* Define to prevent recursive inclusion */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
#ifndef __ADC_INCLUDE_H #ifndef __TXZ_ADC_INCLUDE_H
#define __ADC_INCLUDE_H #define __TXZ_ADC_INCLUDE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -344,6 +366,6 @@ extern "C" {
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __ADC_INCLUDE_H */ #endif /* __TXZ_ADC_INCLUDE_H */

View File

@ -5,9 +5,31 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2018-04-02 19:31:41 #$ * $Date:: 2018-04-02 19:31:41 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/

View File

@ -5,9 +5,31 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-07-21 15:39:36 #$ * $Date:: 2017-07-21 15:39:36 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/

View File

@ -5,9 +5,31 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $date:: $ * $date:: $
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/

View File

@ -5,9 +5,31 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-08-06 10:43:01 #$ * $Date:: 2017-08-06 10:43:01 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@ -56,7 +78,7 @@ extern "C" {
/** /**
* @defgroup FUART_CTSHandshake CTS Handshake * @defgroup FUART_CTSHandshake CTS Handshake
* @brief Available CTS Handshake Macro Definisiton. * @brief Available CTS Handshake Macro Definition.
* @{ * @{
*/ */
#define FUART_CTS_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define FUART_CTS_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -68,7 +90,7 @@ extern "C" {
/** /**
* @defgroup FUART_RTSHandshake RTS Handshake * @defgroup FUART_RTSHandshake RTS Handshake
* @brief Available RTS Handshake Macro Definisiton. * @brief Available RTS Handshake Macro Definition.
* @{ * @{
*/ */
#define FUART_RTS_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define FUART_RTS_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -79,7 +101,7 @@ extern "C" {
/** /**
* @defgroup FUART_FIFO FIFO Enable * @defgroup FUART_FIFO FIFO Enable
* @brief FIFO Enable Bit Macro Definisiton. * @brief FIFO Enable Bit Macro Definition.
* @{ * @{
*/ */
#define FUART_FIFO_DISABLE ((uint32_t)0x00000000) /*!< Disable. */ #define FUART_FIFO_DISABLE ((uint32_t)0x00000000) /*!< Disable. */
@ -91,7 +113,7 @@ extern "C" {
/** /**
* @defgroup FUART_StopBit Stop Bit * @defgroup FUART_StopBit Stop Bit
* @brief Stop Bit Macro Definisiton. * @brief Stop Bit Macro Definition.
* @{ * @{
*/ */
#define FUART_STOP_BIT_1 ((uint32_t)0x00000000) /*!< 1 bit */ #define FUART_STOP_BIT_1 ((uint32_t)0x00000000) /*!< 1 bit */
@ -103,7 +125,7 @@ extern "C" {
/** /**
* @defgroup FUART_ParityBit Parity Bit * @defgroup FUART_ParityBit Parity Bit
* @brief Parity Bit Macro Definisiton. * @brief Parity Bit Macro Definition.
* @{ * @{
*/ */
#define FUART_PARITY_BIT_ODD ((uint32_t)0x00000000) /*!< Odd Parity */ #define FUART_PARITY_BIT_ODD ((uint32_t)0x00000000) /*!< Odd Parity */
@ -115,7 +137,7 @@ extern "C" {
/** /**
* @defgroup FUART_ParityEnable Parity Enable * @defgroup FUART_ParityEnable Parity Enable
* @brief Enable/Disable Parity Macro Definisiton. * @brief Enable/Disable Parity Macro Definition.
* @{ * @{
*/ */
#define FUART_PARITY_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define FUART_PARITY_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -126,7 +148,7 @@ extern "C" {
/** /**
* @defgroup FUART_StaticParityEnable Static Parity Enable * @defgroup FUART_StaticParityEnable Static Parity Enable
* @brief Enable/Disable Static Parity Macro Definisiton. * @brief Enable/Disable Static Parity Macro Definition.
* @{ * @{
*/ */
#define FUART_STATIC_PARITY_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define FUART_STATIC_PARITY_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -137,7 +159,7 @@ extern "C" {
/** /**
* @defgroup FUART_DataLength Data Length * @defgroup FUART_DataLength Data Length
* @brief Data Length Macro Definisiton. * @brief Data Length Macro Definition.
* @{ * @{
*/ */
#define FUART_DATA_LENGTH_5 ((uint32_t)0x00000000) /*!< 5 bit */ #define FUART_DATA_LENGTH_5 ((uint32_t)0x00000000) /*!< 5 bit */
@ -150,7 +172,7 @@ extern "C" {
/** /**
* @defgroup FUART_FIFO_Level FIFO Level * @defgroup FUART_FIFO_Level FIFO Level
* @brief FIFO Level Macro Definisiton. * @brief FIFO Level Macro Definition.
* @{ * @{
*/ */
#define FUART_FIFO_LEVEL_4 ((uint32_t)0x00000000) /*!< 4 level */ #define FUART_FIFO_LEVEL_4 ((uint32_t)0x00000000) /*!< 4 level */
@ -164,8 +186,8 @@ extern "C" {
*/ /* End of group FUART_DataLength */ */ /* End of group FUART_DataLength */
/** /**
* @defgroup FUART_TxInterrupt Tx Interrpt * @defgroup FUART_TxInterrupt Tx Interrupt
* @brief Available Transmit Interrupt Macro Definisiton. * @brief Available Transmit Interrupt Macro Definition.
* @{ * @{
*/ */
#define FUART_TX_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define FUART_TX_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -176,8 +198,8 @@ extern "C" {
/** /**
* @defgroup FUART_RxInterrupt Rx Interrpt * @defgroup FUART_RxInterrupt Rx Interrupt
* @brief Available Receive Interrupt Macro Definisiton. * @brief Available Receive Interrupt Macro Definition.
* @{ * @{
*/ */
#define FUART_RX_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define FUART_RX_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -189,12 +211,12 @@ extern "C" {
/** /**
* @defgroup FUART_ErrorInterrupt Error Interrupt * @defgroup FUART_ErrorInterrupt Error Interrupt
* @brief Enable/Disable Error Interrupt Macro Definisiton. * @brief Enable/Disable Error Interrupt Macro Definition.
* @{ * @{
*/ */
/** /**
* @defgroup FUART_OVER_RUN_ErrorInterrupt Over Run Error Interrupt * @defgroup FUART_OVER_RUN_ErrorInterrupt Over Run Error Interrupt
* @brief Enable/Disable Error Interrupt Macro Definisiton. * @brief Enable/Disable Error Interrupt Macro Definition.
* @{ * @{
*/ */
#define FUART_OV_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define FUART_OV_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -205,7 +227,7 @@ extern "C" {
/** /**
* @defgroup FUART_BREAK_ErrorInterrupt Break Error Interrupt * @defgroup FUART_BREAK_ErrorInterrupt Break Error Interrupt
* @brief Enable/Disable Error Interrupt Macro Definisiton. * @brief Enable/Disable Error Interrupt Macro Definition.
* @{ * @{
*/ */
#define FUART_BK_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define FUART_BK_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -216,7 +238,7 @@ extern "C" {
/** /**
* @defgroup FUART_PARITY_ErrorInterrupt Parity Error Interrupt * @defgroup FUART_PARITY_ErrorInterrupt Parity Error Interrupt
* @brief Enable/Disable Error Interrupt Macro Definisiton. * @brief Enable/Disable Error Interrupt Macro Definition.
* @{ * @{
*/ */
#define FUART_PA_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define FUART_PA_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -227,7 +249,7 @@ extern "C" {
/** /**
* @defgroup FUART_FRAMING_ErrorInterrupt Framing Error Interrupt * @defgroup FUART_FRAMING_ErrorInterrupt Framing Error Interrupt
* @brief Enable/Disable Error Interrupt Macro Definisiton. * @brief Enable/Disable Error Interrupt Macro Definition.
* @{ * @{
*/ */
#define FUART_FR_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define FUART_FR_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -238,7 +260,7 @@ extern "C" {
/** /**
* @defgroup FUART_RX_TIMEOUT_ErrorInterrupt Rx Timeout Error Interrupt * @defgroup FUART_RX_TIMEOUT_ErrorInterrupt Rx Timeout Error Interrupt
* @brief Enable/Disable Error Interrupt Macro Definisiton. * @brief Enable/Disable Error Interrupt Macro Definition.
* @{ * @{
*/ */
#define FUART_TO_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define FUART_TO_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -253,7 +275,7 @@ extern "C" {
/** /**
* @defgroup FUART_RangeK Range K * @defgroup FUART_RangeK Range K
* @brief Range of K Macro Definisiton. * @brief Range of K Macro Definition.
* @brief Range of K be set "(UART_RANGE_K_MIN <= Value <= FUART_RANGE_K_MAX)". * @brief Range of K be set "(UART_RANGE_K_MIN <= Value <= FUART_RANGE_K_MAX)".
* @{ * @{
*/ */
@ -266,7 +288,7 @@ extern "C" {
/** /**
* @defgroup FUART_RangeN Range N * @defgroup FUART_RangeN Range N
* @brief Range of N Macro Definisiton. * @brief Range of N Macro Definition.
* @brief Range of N be set "(UART_RANGE_N_MIN <= Value <= FUART_RANGE_N_MAX)". * @brief Range of N be set "(UART_RANGE_N_MIN <= Value <= FUART_RANGE_N_MAX)".
* @{ * @{
*/ */
@ -279,7 +301,7 @@ extern "C" {
/** /**
* @defgroup FUART_OverrunErr Overrun Error * @defgroup FUART_OverrunErr Overrun Error
* @brief Overrun Error Macro Definisiton. * @brief Overrun Error Macro Definition.
* @{ * @{
*/ */
#define FUART_OVERRUN_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define FUART_OVERRUN_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -291,7 +313,7 @@ extern "C" {
/** /**
* @defgroup FUART_BreakErr Break Error * @defgroup FUART_BreakErr Break Error
* @brief Break Error Macro Definisiton. * @brief Break Error Macro Definition.
* @{ * @{
*/ */
#define FUART_BREAK_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define FUART_BREAK_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -303,7 +325,7 @@ extern "C" {
/** /**
* @defgroup FUART_ParityErr Parity Error * @defgroup FUART_ParityErr Parity Error
* @brief Parity Error Macro Definisiton. * @brief Parity Error Macro Definition.
* @{ * @{
*/ */
#define FUART_PARITY_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define FUART_PARITY_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -315,7 +337,7 @@ extern "C" {
/** /**
* @defgroup FUART_FramingErr Framing Error * @defgroup FUART_FramingErr Framing Error
* @brief Framing Error Macro Definisiton. * @brief Framing Error Macro Definition.
* @{ * @{
*/ */
#define FUART_FRAMING_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define FUART_FRAMING_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -382,7 +404,7 @@ extern "C" {
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Receive event information structure definenition. * @brief Receive event information structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -393,7 +415,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Transmit data information structure definenition. * @brief Transmit data information structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -404,7 +426,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Boudrate setting structure definenition. * @brief Boudrate setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -443,7 +465,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Initial setting structure definenition. * @brief Initial setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -477,7 +499,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief FUART handle structure definenition. * @brief FUART handle structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -486,18 +508,18 @@ typedef struct
fuart_initial_setting_t init; /*!< Initial setting. */ fuart_initial_setting_t init; /*!< Initial setting. */
/*------------------------------------------*/ /*------------------------------------------*/
/*! /*!
@brief Transmit Informatin. @brief Transmit Information.
*/ */
/*------------------------------------------*/ /*------------------------------------------*/
struct struct
{ {
uint32_t rp; /*!< Num of transmited data. */ uint32_t rp; /*!< Num of transmitted data. */
fuart_transmit_t info; /*!< Transmit Data Information. */ fuart_transmit_t info; /*!< Transmit Data Information. */
void (*handler)(uint32_t id, TXZ_Result result); /*!< Transmit Event handler. */ void (*handler)(uint32_t id, TXZ_Result result); /*!< Transmit Event handler. */
} transmit; } transmit;
/*------------------------------------------*/ /*------------------------------------------*/
/*! /*!
@brief Receive Informatin. @brief Receive Information.
*/ */
/*------------------------------------------*/ /*------------------------------------------*/
struct struct

View File

@ -6,9 +6,31 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-08-06 10:43:01 #$ * $Date:: 2017-08-06 10:43:01 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/

View File

@ -5,9 +5,31 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-08-06 10:43:01 #$ * $Date:: 2017-08-06 10:43:01 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@ -282,7 +304,7 @@ extern "C" {
/* Inline Functions */ /* Inline Functions */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/** /**
* @addtogroup FUART_Private_fuctions * @addtogroup FUART_Private_functions
* @{ * @{
*/ */
__STATIC_INLINE void disable_FUARTxCR_TXE(TSB_FURT_TypeDef *p_instance); __STATIC_INLINE void disable_FUARTxCR_TXE(TSB_FURT_TypeDef *p_instance);

View File

@ -5,9 +5,31 @@
* @version V1.0.0. * @version V1.0.0.
* $Date:: 2017-11-09 16:44:27 #$ * $Date:: 2017-11-09 16:44:27 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENCE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@ -204,7 +226,7 @@ typedef enum
GPIO_PA1_EA01 = GPIO_FR_1, /*!< PAFR1: EA01 */ GPIO_PA1_EA01 = GPIO_FR_1, /*!< PAFR1: EA01 */
GPIO_PA1_T32A00OUTA = GPIO_FR_3, /*!< PAFR3: T32A00OUTA */ GPIO_PA1_T32A00OUTA = GPIO_FR_3, /*!< PAFR3: T32A00OUTA */
GPIO_PA1_T32A00OUTC = GPIO_FR_5, /*!< PAFR5: T32A00OUTC */ GPIO_PA1_T32A00OUTC = GPIO_FR_5, /*!< PAFR5: T32A00OUTC */
GPIO_PA1_TSPI0CLK = GPIO_FR_7, /*!< PAFR7: TSPI0CLK */ GPIO_PA1_TSPI0SCK = GPIO_FR_7, /*!< PAFR7: TSPI0SCK */
}gpio_pa1_func_t; }gpio_pa1_func_t;
/** /**
@ -233,7 +255,7 @@ typedef enum
GPIO_PA3_T32A00INB0 = GPIO_FR_3, /*!< PAFR3: T32A00INB0 */ GPIO_PA3_T32A00INB0 = GPIO_FR_3, /*!< PAFR3: T32A00INB0 */
GPIO_PA3_T32A00INC1 = GPIO_FR_5, /*!< PAFR5: T32A00INC1 */ GPIO_PA3_T32A00INC1 = GPIO_FR_5, /*!< PAFR5: T32A00INC1 */
GPIO_PA3_TSPI2CS1 = GPIO_FR_6, /*!< PAFR6: TSPI2CS1 */ GPIO_PA3_TSPI2CS1 = GPIO_FR_6, /*!< PAFR6: TSPI2CS1 */
GPIO_PA3_TSPI0TXD = GPIO_FR_7, /*!< PAFR6: TSPI2CS1 */ GPIO_PA3_TSPI0TXD = GPIO_FR_7, /*!< PAFR7: TSPI0TXD */
}gpio_pa3_func_t; }gpio_pa3_func_t;
/** /**
@ -883,7 +905,7 @@ typedef enum
GPIO_PG2_INPUT = 0, /*!< 0: Input Port */ GPIO_PG2_INPUT = 0, /*!< 0: Input Port */
GPIO_PG2_OUTPUT = 0, /*!< 0: Output Port */ GPIO_PG2_OUTPUT = 0, /*!< 0: Output Port */
GPIO_PG2_UT2RTS_N = GPIO_FR_3, /*!< PCFR3: UT2RTS_N */ GPIO_PG2_UT2RTS_N = GPIO_FR_3, /*!< PCFR3: UT2RTS_N */
GPIO_PG2_RTCALARM = GPIO_FR_4, /*!< PCFR4: RTCALARM */ GPIO_PG2_ALARM_N = GPIO_FR_4, /*!< PCFR4: ALARM_N */
GPIO_PG2_UT2CTS_N = GPIO_FR_5, /*!< PCFR5: UT2CTS_N */ GPIO_PG2_UT2CTS_N = GPIO_FR_5, /*!< PCFR5: UT2CTS_N */
GPIO_PG2_I2C0SDA = GPIO_FR_7, /*!< PCFR7: I2C0SDA */ GPIO_PG2_I2C0SDA = GPIO_FR_7, /*!< PCFR7: I2C0SDA */
}gpio_pg2_func_t; }gpio_pg2_func_t;
@ -1257,7 +1279,7 @@ typedef enum
GPIO_PK6_T32A01INA0 = GPIO_FR_2, /*!< PKFR2: T32A01INA0 */ GPIO_PK6_T32A01INA0 = GPIO_FR_2, /*!< PKFR2: T32A01INA0 */
GPIO_PK6_T32A01INC0 = GPIO_FR_3, /*!< PKFR3: T32A01INC0 */ GPIO_PK6_T32A01INC0 = GPIO_FR_3, /*!< PKFR3: T32A01INC0 */
GPIO_PK6_TSPI3SCK = GPIO_FR_4, /*!< PKFR4: TSPI3SCK */ GPIO_PK6_TSPI3SCK = GPIO_FR_4, /*!< PKFR4: TSPI3SCK */
GPIO_PK6_SMI0SCK = GPIO_FR_6, /*!< PKFR6: SMI0SCK */ GPIO_PK6_SMI0CLK = GPIO_FR_6, /*!< PKFR6: SMI0CLK */
}gpio_pk6_func_t; }gpio_pk6_func_t;
/** /**
@ -1299,7 +1321,7 @@ typedef enum
{ {
GPIO_PL1_INPUT = 0, /*!< 0: Input Port */ GPIO_PL1_INPUT = 0, /*!< 0: Input Port */
GPIO_PL1_OUTPUT = 0, /*!< 0: Output Port */ GPIO_PL1_OUTPUT = 0, /*!< 0: Output Port */
GPIO_PL1_TPI1SCK = GPIO_FR_7, /*!< PLFR7: TPI1SCK */ GPIO_PL1_TSPI1SCK = GPIO_FR_7,/*!< PLFR7: TSPI1SCK */
}gpio_pl1_func_t; }gpio_pl1_func_t;
/** /**
@ -1845,7 +1867,7 @@ typedef enum
GPIO_PT3_INPUT = 0, /*!< 0: Input Port */ GPIO_PT3_INPUT = 0, /*!< 0: Input Port */
GPIO_PT3_OUTPUT = 0, /*!< 0: Output Port */ GPIO_PT3_OUTPUT = 0, /*!< 0: Output Port */
GPIO_PT3_INT00b = 0, /*!< 0: INT00b */ GPIO_PT3_INT00b = 0, /*!< 0: INT00b */
GPIO_PT3_RTCCLK = GPIO_FR_1, /*!< PTFR1: RTCCLK */ GPIO_PT3_RTCOUT = GPIO_FR_1, /*!< PTFR1: RTCOUT */
GPIO_PT3_T32A03OUTA = GPIO_FR_2, /*!< PTFR2: T32A03OUTA */ GPIO_PT3_T32A03OUTA = GPIO_FR_2, /*!< PTFR2: T32A03OUTA */
GPIO_PT3_T32A03OUTC = GPIO_FR_3, /*!< PTFR3: T32A03OUTC */ GPIO_PT3_T32A03OUTC = GPIO_FR_3, /*!< PTFR3: T32A03OUTC */
GPIO_PT3_RXIN0 = 0, /*!< 0: RXIN0 */ GPIO_PT3_RXIN0 = 0, /*!< 0: RXIN0 */
@ -2276,7 +2298,7 @@ typedef enum
*/ */
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief GPIO handle structure definenition. * @brief GPIO handle structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
#if defined(TMPM4G6) #if defined(TMPM4G6)

View File

@ -5,9 +5,31 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-08-09 11:01:04 #$ * $Date:: 2017-08-09 11:01:04 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/

View File

@ -5,9 +5,31 @@
* @version V1.0.0.4 * @version V1.0.0.4
* $Date:: 2016-11-24 00:00:00 #$ * $Date:: 2016-11-24 00:00:00 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@ -292,7 +314,7 @@ extern "C" {
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Clock setting structure definenition. * @brief Clock setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -303,7 +325,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Wakeup Control setting structure definenition. * @brief Wakeup Control setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -316,7 +338,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Initial setting structure definenition. * @brief Initial setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -326,7 +348,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Initial setting structure definenition. * @brief Initial setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -336,7 +358,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief I2C handle structure definenition. * @brief I2C handle structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -347,7 +369,7 @@ typedef struct
#if defined(I2CSxWUP_EN) #if defined(I2CSxWUP_EN)
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief I2CS handle structure definenition. * @brief I2CS handle structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -644,8 +666,8 @@ __STATIC_INLINE int32_t I2C_transmitter(I2C_t *p_obj)
/** /**
* @brief Interrupt Status * @brief Interrupt Status
* @param p_obj :I2C object. * @param p_obj :I2C object.
* @retval true :Interruput Occured. * @retval true :Interrupt Occurred.
* @retval false :No Interruput Occured. * @retval false :No Interrupt Occurred.
* @note - * @note -
*/ */
/*--------------------------------------------------*/ /*--------------------------------------------------*/

View File

@ -5,9 +5,31 @@
* @version V1.0.0.2 * @version V1.0.0.2
* $Date:: 2017-10-03 #$ * $Date:: 2017-10-03 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/

View File

@ -5,12 +5,33 @@
* @version V1.0.0.3 * @version V1.0.0.3
* $Date:: 2017-10-26 13:33:43 #$ * $Date:: 2017-10-26 13:33:43 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __TXZ_SAMPLE_DEF_H #ifndef __TXZ_SAMPLE_DEF_H
#define __TXZ_SAMPLE_DEF_H #define __TXZ_SAMPLE_DEF_H

View File

@ -5,9 +5,31 @@
* @version V1.0.0.7 * @version V1.0.0.7
* $Date:: 2017-11-30 17:34:52 #$ * $Date:: 2017-11-30 17:34:52 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@ -244,7 +266,7 @@ extern "C" {
* @brief T32AxOUTA Control OCRx Macro Definition. * @brief T32AxOUTA Control OCRx Macro Definition.
* @{ * @{
*/ */
#define T32A_OCR_DISABLE ((uint32_t)0x00000000) /*!< Nothig */ #define T32A_OCR_DISABLE ((uint32_t)0x00000000) /*!< Nothing */
#define T32A_OCR_SET ((uint32_t)0x00000001) /*!< Hi */ #define T32A_OCR_SET ((uint32_t)0x00000001) /*!< Hi */
#define T32A_OCR_CLR ((uint32_t)0x00000002) /*!< Low */ #define T32A_OCR_CLR ((uint32_t)0x00000002) /*!< Low */
#define T32A_OCR_INVERSION ((uint32_t)0x00000003) /*!< inversion */ #define T32A_OCR_INVERSION ((uint32_t)0x00000003) /*!< inversion */
@ -688,7 +710,7 @@ typedef enum
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_mode_t * @struct t32a_mode_t
* @brief TimerA Mode Setting structure definenition. * @brief TimerA Mode Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -702,7 +724,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_runx_t * @struct t32a_runx_t
* @brief TimerA Run Control Setting structure definenition. * @brief TimerA Run Control Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -720,7 +742,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_crx_t * @struct t32a_crx_t
* @brief Counter Register Control Setting structure definenition. * @brief Counter Register Control Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -744,7 +766,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_outcrx0_t * @struct t32a_outcrx0_t
* @brief TimerA Output Control Setting structure definenition. * @brief TimerA Output Control Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -756,7 +778,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_outcrx1_t * @struct t32a_outcrx1_t
* @brief T32AxOUTA Control Setting structure definenition. * @brief T32AxOUTA Control Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -774,7 +796,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_capcrx_t * @struct t32a_capcrx_t
* @brief Capture Control Setting structure definenition. * @brief Capture Control Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -788,7 +810,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_rgx0_t * @struct t32a_rgx0_t
* @brief T32A Timer Register x0 Setting structure definenition. * @brief T32A Timer Register x0 Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -800,7 +822,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_rgx1_t * @struct t32a_rgx1_t
* @brief T32A Timer Register x1 Setting structure definenition. * @brief T32A Timer Register x1 Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -812,7 +834,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_tmrx_t * @struct t32a_tmrx_t
* @brief T32A Counter Capture Register A Setting structure definenition. * @brief T32A Counter Capture Register A Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -824,7 +846,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_reldx_t * @struct t32a_reldx_t
* @brief T32A Counter Reload Register Setting structure definenition. * @brief T32A Counter Reload Register Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -836,7 +858,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_capx0_t * @struct t32a_capx0_t
* @brief T32A Capture Register x0 Setting structure definenition. * @brief T32A Capture Register x0 Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -848,7 +870,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_capx1_t * @struct t32a_capx1_t
* @brief T32A Capture Register x0 Setting structure definenition. * @brief T32A Capture Register x0 Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -860,7 +882,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_imx_t * @struct t32a_imx_t
* @brief Interrupt mask register Setting structure definenition. * @brief Interrupt mask register Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -880,7 +902,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_stx_t * @struct t32a_stx_t
* @brief Status register structure definenition. * @brief Status register structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -900,7 +922,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_dma_req_t * @struct t32a_dma_req_t
* @brief DMA Request register setting structure definenition. * @brief DMA Request register setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -916,7 +938,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct t32a_pulse_cr_t * @struct t32a_pulse_cr_t
* @brief Pulse Count Control register setting structure definenition. * @brief Pulse Count Control register setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -935,7 +957,7 @@ typedef struct
/** /**
* @struct t32a_initial_setting_t * @struct t32a_initial_setting_t
* @brief Initial Timer setting structure definenition. * @brief Initial Timer setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -962,7 +984,7 @@ typedef struct
/** /**
* @struct t32a_initial_mode_t * @struct t32a_initial_mode_t
* @brief Initial Mode setting structure definenition. * @brief Initial Mode setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -973,7 +995,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief T32A handle structure definenition. * @brief T32A handle structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct t32a_handle typedef struct t32a_handle

View File

@ -5,9 +5,31 @@
* @version V1.0.0.3 * @version V1.0.0.3
* $Date:: 2018-02-28 13:37:55 #$ * $Date:: 2018-02-28 13:37:55 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENCE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@ -81,8 +103,8 @@ extern "C" {
* @brief Software Rest Macro Definition. * @brief Software Rest Macro Definition.
* @{ * @{
*/ */
#define TSPI_RESET10 ((uint32_t)0x00000080) /*!< RESET Pattarn 10 */ #define TSPI_RESET10 ((uint32_t)0x00000080) /*!< RESET Pattern 10 */
#define TSPI_RESET01 ((uint32_t)0x00000040) /*!< RESET Pattarn 01 */ #define TSPI_RESET01 ((uint32_t)0x00000040) /*!< RESET Pattern 01 */
/** /**
* @} * @}
*/ /* End of group TSPI_SW_Reset */ */ /* End of group TSPI_SW_Reset */
@ -100,7 +122,7 @@ extern "C" {
*/ /* End of group TSPI_Enable */ */ /* End of group TSPI_Enable */
/** /**
* @defgroup TSPI_Triger_Control Triger Control * @defgroup TSPI_Trigger_Control Trigger Control
* @brief Enable/Disable TRGEN Macro Definition. * @brief Enable/Disable TRGEN Macro Definition.
* @{ * @{
*/ */
@ -124,7 +146,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Transmission_Mode Transmission Mode * @defgroup TSPI_Transmission_Mode Transmission Mode
* @brief TSPIIMS Mode Macro Definisiton. * @brief TSPIIMS Mode Macro Definition.
* @{ * @{
*/ */
#define TSPI_SPI_MODE ((uint32_t)0x00000000) /*!< TSPI MODE */ #define TSPI_SPI_MODE ((uint32_t)0x00000000) /*!< TSPI MODE */
@ -136,10 +158,10 @@ extern "C" {
/** /**
* @defgroup TSPI_Operation_Select Operation Select * @defgroup TSPI_Operation_Select Operation Select
* @brief Master/Slave MSTR Operation Macro Definisiton. * @brief Master/Slave MSTR Operation Macro Definition.
* @{ * @{
*/ */
#define TSPI_MASTER_OPEARTION ((uint32_t)0x00001000) /*!< MASTER MODE */ #define TSPI_MASTER_OPERATION ((uint32_t)0x00001000) /*!< MASTER MODE */
#define TSPI_SLAVE_OPERATION ((uint32_t)0x00000000) /*!< SLAVE MODE */ #define TSPI_SLAVE_OPERATION ((uint32_t)0x00000000) /*!< SLAVE MODE */
/** /**
* @} * @}
@ -148,7 +170,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Transfer_Mode Transfer Mode * @defgroup TSPI_Transfer_Mode Transfer Mode
* @brief Transfer Mode TMMD Macro Definisiton. * @brief Transfer Mode TMMD Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_ONLY ((uint32_t)0x00000400) /*!< SEND ONLY */ #define TSPI_TX_ONLY ((uint32_t)0x00000400) /*!< SEND ONLY */
@ -162,7 +184,7 @@ extern "C" {
/** /**
* @defgroup TSPI_CSSEL_Select CSSEL Select * @defgroup TSPI_CSSEL_Select CSSEL Select
* @brief TSPIIxCS0/1/2/3 Select Macro Definisiton. * @brief TSPIIxCS0/1/2/3 Select Macro Definition.
* @{ * @{
*/ */
#define TSPI_TSPIxCS0_ENABLE ((uint32_t)0x00000000) /*!< TSPIIxCS0 */ #define TSPI_TSPIxCS0_ENABLE ((uint32_t)0x00000000) /*!< TSPIIxCS0 */
@ -175,17 +197,18 @@ extern "C" {
/** /**
* @defgroup TSPI_Transfer_Frame_Range Transfer Frame Range * @defgroup TSPI_Transfer_Frame_Range Transfer Frame Range
* @brief Transfer Frame Range Macro Definisiton. * @brief Transfer Frame Range Macro Definition.
* @{ * @{
*/ */
#define TSPI_TRANS_RANGE_SINGLE ((uint32_t)0x00000000) /*!< Single Transfer Frame :0 */ #define TSPI_TRANS_RANGE_CONTINUE ((uint32_t)0x00000000) /*!< Continue Transfer Frame :0 */
#define TSPI_TRANS_RANGE_SINGLE ((uint32_t)0x00000001) /*!< Single Transfer Frame :1 */
#define TSPI_TRANS_RANGE_MAX ((uint32_t)0x000000FF) /*!< Maximum Transfer Frame Value :=255 */ #define TSPI_TRANS_RANGE_MAX ((uint32_t)0x000000FF) /*!< Maximum Transfer Frame Value :=255 */
/** /**
* @} * @}
*/ /* End of group TSPI_Transfer_Frame_Range */ */ /* End of group TSPI_Transfer_Frame_Range */
/** /**
* @defgroup TSPI_IDLE_Output_value IDLE Output Value * @defgroup TSPI_IDLE_Output_value IDLE Output Value
* @brief IDLE time Output Value TIDLE Macro Definisiton. * @brief IDLE time Output Value TIDLE Macro Definition.
* @{ * @{
*/ */
#define TSPI_TIDLE_Hiz ((uint32_t)0x00000000) /*!< Hi-z */ #define TSPI_TIDLE_Hiz ((uint32_t)0x00000000) /*!< Hi-z */
@ -198,7 +221,7 @@ extern "C" {
/** /**
* @defgroup TSPI_RXDLY_value RXDLY Value * @defgroup TSPI_RXDLY_value RXDLY Value
* @brief IDLE time Output Value TIDLE Macro Definisiton. * @brief IDLE time Output Value TIDLE Macro Definition.
* @{ * @{
*/ */
#define TSPI_RXDLY_SET ((uint32_t)0x00010000) /*!< RXDLY SET */ #define TSPI_RXDLY_SET ((uint32_t)0x00010000) /*!< RXDLY SET */
@ -209,7 +232,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Underrun_Output_value Underrun Occur Output Value * @defgroup TSPI_Underrun_Output_value Underrun Occur Output Value
* @brief In case of Under Run Output Value TXDEMP Macro Definisiton. * @brief In case of Under Run Output Value TXDEMP Macro Definition.
* @{ * @{
*/ */
#define TSPI_TXDEMP_LOW ((uint32_t)0x00000000) /*!< Low */ #define TSPI_TXDEMP_LOW ((uint32_t)0x00000000) /*!< Low */
@ -221,7 +244,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TxFillLevel Tx Fill Level * @defgroup TSPI_TxFillLevel Tx Fill Level
* @brief Transmit Fill Level Macro Definisiton. * @brief Transmit Fill Level Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_FILL_LEVEL_0 ((uint32_t)0x00000000) /*!< 0 */ #define TSPI_TX_FILL_LEVEL_0 ((uint32_t)0x00000000) /*!< 0 */
@ -240,10 +263,9 @@ extern "C" {
/** /**
* @defgroup TSPI_RxFillLevel Rx Fill Level * @defgroup TSPI_RxFillLevel Rx Fill Level
* @brief Receive Fill Level Macro Definisiton. * @brief Receive Fill Level Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_FILL_LEVEL_0 ((uint32_t)0x00000000) /*!< 8 */
#define TSPI_RX_FILL_LEVEL_1 ((uint32_t)0x00000100) /*!< 1 */ #define TSPI_RX_FILL_LEVEL_1 ((uint32_t)0x00000100) /*!< 1 */
#define TSPI_RX_FILL_LEVEL_2 ((uint32_t)0x00000200) /*!< 2 */ #define TSPI_RX_FILL_LEVEL_2 ((uint32_t)0x00000200) /*!< 2 */
#define TSPI_RX_FILL_LEVEL_3 ((uint32_t)0x00000300) /*!< 3 */ #define TSPI_RX_FILL_LEVEL_3 ((uint32_t)0x00000300) /*!< 3 */
@ -251,15 +273,16 @@ extern "C" {
#define TSPI_RX_FILL_LEVEL_5 ((uint32_t)0x00000500) /*!< 5 */ #define TSPI_RX_FILL_LEVEL_5 ((uint32_t)0x00000500) /*!< 5 */
#define TSPI_RX_FILL_LEVEL_6 ((uint32_t)0x00000600) /*!< 6 */ #define TSPI_RX_FILL_LEVEL_6 ((uint32_t)0x00000600) /*!< 6 */
#define TSPI_RX_FILL_LEVEL_7 ((uint32_t)0x00000700) /*!< 7 */ #define TSPI_RX_FILL_LEVEL_7 ((uint32_t)0x00000700) /*!< 7 */
#define TSPI_RX_FILL_LEVEL_MASK ((uint32_t)0x00000700) /*!< MASK */ #define TSPI_RX_FILL_LEVEL_8 ((uint32_t)0x00000800) /*!< 8 */
#define TSPI_RX_FILL_LEVEL_MASK ((uint32_t)0x00000F00) /*!< MASK */
/** /**
* @} * @}
*/ /* End of group TSPI_RxFillLevel */ */ /* End of group TSPI_RxFillLevel */
/** /**
* @defgroup TSPI_TxFIFOInterrupt Tx FIFO Interrpt * @defgroup TSPI_TxFIFOInterrupt Tx FIFO Interrupt
* @brief Enable/Disable Transmit FIFO Interrupt Macro Definisiton. * @brief Enable/Disable Transmit FIFO Interrupt Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_FIFO_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define TSPI_TX_FIFO_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -270,8 +293,8 @@ extern "C" {
/** /**
* @defgroup TSPI_TxInterrupt Tx Interrpt * @defgroup TSPI_TxInterrupt Tx Interrupt
* @brief Enable/Disable Transmit Interrupt Macro Definisiton. * @brief Enable/Disable Transmit Interrupt Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define TSPI_TX_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -282,8 +305,8 @@ extern "C" {
/** /**
* @defgroup TSPI_RxFIFOInterrupt Rx FIFO Interrpt * @defgroup TSPI_RxFIFOInterrupt Rx FIFO Interrupt
* @brief Enable/Disable Receive FIFO Interrupt Macro Definisiton. * @brief Enable/Disable Receive FIFO Interrupt Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_FIFO_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define TSPI_RX_FIFO_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -294,8 +317,8 @@ extern "C" {
/** /**
* @defgroup TSPI_RxInterrupt Rx Interrpt * @defgroup TSPI_RxInterrupt Rx Interrupt
* @brief Enable/Disable Receive Interrupt Macro Definisiton. * @brief Enable/Disable Receive Interrupt Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define TSPI_RX_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -307,7 +330,7 @@ extern "C" {
/** /**
* @defgroup TSPI_ErrorInterrupt Error Interrupt * @defgroup TSPI_ErrorInterrupt Error Interrupt
* @brief Enable/Disable Error Interrupt Macro Definisiton. * @brief Enable/Disable Error Interrupt Macro Definition.
* @{ * @{
*/ */
#define TSPI_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define TSPI_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -319,7 +342,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TxDMAInterrupt Tx DMA Interrupt * @defgroup TSPI_TxDMAInterrupt Tx DMA Interrupt
* @brief Enable/Disable Transmit DMA Interrupt Macro Definisiton. * @brief Enable/Disable Transmit DMA Interrupt Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_DMA_INT_MASK ((uint32_t)0x00000002) /*!< Mask Data */ #define TSPI_TX_DMA_INT_MASK ((uint32_t)0x00000002) /*!< Mask Data */
@ -332,7 +355,7 @@ extern "C" {
/** /**
* @defgroup TSPI_RxDMAInterrupt Rx DMA Interrupt * @defgroup TSPI_RxDMAInterrupt Rx DMA Interrupt
* @brief Enable/Disable Receive DMA Interrupt Macro Definisiton. * @brief Enable/Disable Receive DMA Interrupt Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_DMA_INT_MASK ((uint32_t)0x00000001) /*!< Mask Data */ #define TSPI_RX_DMA_INT_MASK ((uint32_t)0x00000001) /*!< Mask Data */
@ -345,7 +368,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Tx_Buffer_Clear Tx Buffer Clear * @defgroup TSPI_Tx_Buffer_Clear Tx Buffer Clear
* @brief Tx Buffer Clear Macro Definisiton. * @brief Tx Buffer Clear Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_BUFF_CLR_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define TSPI_TX_BUFF_CLR_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -357,7 +380,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Rx_Buffer_Clear Rx Buffer Clear * @defgroup TSPI_Rx_Buffer_Clear Rx Buffer Clear
* @brief Rx Buffer Clear Macro Definisiton. * @brief Rx Buffer Clear Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_BUFF_CLR_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define TSPI_RX_BUFF_CLR_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -369,7 +392,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Baudrate_Clock Baudrate Input Clock * @defgroup TSPI_Baudrate_Clock Baudrate Input Clock
* @brief Baudrate Input Clock Macro Definisiton. * @brief Baudrate Input Clock Macro Definition.
* @{ * @{
*/ */
#define TSPI_BR_CLOCK_0 ((uint32_t)0x00000000) /*!< T0 */ #define TSPI_BR_CLOCK_0 ((uint32_t)0x00000000) /*!< T0 */
@ -389,7 +412,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Baudrate_Divider Baudrate Divider * @defgroup TSPI_Baudrate_Divider Baudrate Divider
* @brief Baudrate IDivider Macro Definisiton. * @brief Baudrate IDivider Macro Definition.
* @{ * @{
*/ */
#define TSPI_BR_DIVIDER_16 ((uint32_t)0x00000000) /*!< 1/16 */ #define TSPI_BR_DIVIDER_16 ((uint32_t)0x00000000) /*!< 1/16 */
@ -415,7 +438,7 @@ extern "C" {
/** /**
* @defgroup TSPI_DataDirection Data Direction * @defgroup TSPI_DataDirection Data Direction
* @brief Data Direction Macro Definisiton. * @brief Data Direction Macro Definition.
* @{ * @{
*/ */
#define TSPI_DATA_DIRECTION_LSB ((uint32_t)0x00000000) /*!< LSB first */ #define TSPI_DATA_DIRECTION_LSB ((uint32_t)0x00000000) /*!< LSB first */
@ -427,7 +450,7 @@ extern "C" {
/** /**
* @defgroup TSPI_DataLength Data Length * @defgroup TSPI_DataLength Data Length
* @brief Data Length Macro Definisiton. * @brief Data Length Macro Definition.
* @{ * @{
*/ */
#define TSPI_DATA_LENGTH_8 ((uint32_t)0x08000000) /*!< 8 bit */ #define TSPI_DATA_LENGTH_8 ((uint32_t)0x08000000) /*!< 8 bit */
@ -463,7 +486,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Frame_Interval_Time Frame Interval time * @defgroup TSPI_Frame_Interval_Time Frame Interval time
* @brief Frame Interval time Macro Definisiton. * @brief Frame Interval time Macro Definition.
* @{ * @{
*/ */
#define TSPI_INTERVAL_TIME_0 ((uint32_t)0x00000000) /*!< 0 */ #define TSPI_INTERVAL_TIME_0 ((uint32_t)0x00000000) /*!< 0 */
@ -489,7 +512,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TSPIxCS3_Polarity TSPIxCS3 Polarity * @defgroup TSPI_TSPIxCS3_Polarity TSPIxCS3 Polarity
* @brief TSPIxCS3 Polarity Macro Definisiton. * @brief TSPIxCS3 Polarity Macro Definition.
* @{ * @{
*/ */
#define TSPI_TSPIxCS3_NEGATIVE ((uint32_t)0x00000000) /*!< negative logic */ #define TSPI_TSPIxCS3_NEGATIVE ((uint32_t)0x00000000) /*!< negative logic */
@ -501,7 +524,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TSPIxCS2_Polarity TSPIxCS2 Polarity * @defgroup TSPI_TSPIxCS2_Polarity TSPIxCS2 Polarity
* @brief TSPIxCS2 Polarity Macro Definisiton. * @brief TSPIxCS2 Polarity Macro Definition.
* @{ * @{
*/ */
#define TSPI_TSPIxCS2_NEGATIVE ((uint32_t)0x00000000) /*!< negative logic */ #define TSPI_TSPIxCS2_NEGATIVE ((uint32_t)0x00000000) /*!< negative logic */
@ -513,7 +536,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TSPIxCS1_Polarity TSPIxCS1 Polarity * @defgroup TSPI_TSPIxCS1_Polarity TSPIxCS1 Polarity
* @brief TSPIxCS1 Polarity Macro Definisiton. * @brief TSPIxCS1 Polarity Macro Definition.
* @{ * @{
*/ */
#define TSPI_TSPIxCS1_NEGATIVE ((uint32_t)0x00000000) /*!< negative logic */ #define TSPI_TSPIxCS1_NEGATIVE ((uint32_t)0x00000000) /*!< negative logic */
@ -525,7 +548,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TSPIxCS0_Polarity TSPIxCS0 Polarity * @defgroup TSPI_TSPIxCS0_Polarity TSPIxCS0 Polarity
* @brief TSPIxCS0 Polarity Macro Definisiton. * @brief TSPIxCS0 Polarity Macro Definition.
* @{ * @{
*/ */
#define TSPI_TSPIxCS0_NEGATIVE ((uint32_t)0x00000000) /*!< negative logic */ #define TSPI_TSPIxCS0_NEGATIVE ((uint32_t)0x00000000) /*!< negative logic */
@ -537,7 +560,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Serial_Clock_Polarity Serial Clock Polarity * @defgroup TSPI_Serial_Clock_Polarity Serial Clock Polarity
* @brief Serial Clock Polarity Macro Definisiton. * @brief Serial Clock Polarity Macro Definition.
* @{ * @{
*/ */
#define TSPI_SERIAL_CK_1ST_EDGE ((uint32_t)0x00000000) /*!< 1st Edge Sampling */ #define TSPI_SERIAL_CK_1ST_EDGE ((uint32_t)0x00000000) /*!< 1st Edge Sampling */
@ -549,7 +572,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Serial_Clock_IDLE_Polarity Serial Clock IDLE Polarity * @defgroup TSPI_Serial_Clock_IDLE_Polarity Serial Clock IDLE Polarity
* @brief Serial Clock IDLE Polarity Macro Definisiton. * @brief Serial Clock IDLE Polarity Macro Definition.
* @{ * @{
*/ */
#define TSPI_SERIAL_CK_IDLE_LOW ((uint32_t)0x00000000) /*!< IDLE Term TSPII??SCK LOW */ #define TSPI_SERIAL_CK_IDLE_LOW ((uint32_t)0x00000000) /*!< IDLE Term TSPII??SCK LOW */
@ -561,7 +584,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Minimum_IDLE_Time Minimum IDLE Time * @defgroup TSPI_Minimum_IDLE_Time Minimum IDLE Time
* @brief Minimum IDLE Time Macro Definisiton. * @brief Minimum IDLE Time Macro Definition.
* @{ * @{
*/ */
#define TSPI_MIN_IDLE_TIME_1 ((uint32_t)0x00000400) /*!< 1 x TSPIIxSCK */ #define TSPI_MIN_IDLE_TIME_1 ((uint32_t)0x00000400) /*!< 1 x TSPIIxSCK */
@ -586,7 +609,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Serial_Clock_Delay Serial Clock Delay * @defgroup TSPI_Serial_Clock_Delay Serial Clock Delay
* @brief Serial Clock Delay Macro Definisiton. * @brief Serial Clock Delay Macro Definition.
* @{ * @{
*/ */
#define TSPI_SERIAL_CK_DELAY_1 ((uint32_t)0x00000000) /*!< 1 x TSPIIxSCK */ #define TSPI_SERIAL_CK_DELAY_1 ((uint32_t)0x00000000) /*!< 1 x TSPIIxSCK */
@ -612,7 +635,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Negate_Delay Negate Delay * @defgroup TSPI_Negate_Delay Negate Delay
* @brief Negate Delay Macro Definisiton. * @brief Negate Delay Macro Definition.
* @{ * @{
*/ */
#define TSPI_NEGATE_1 ((uint32_t)0x00000000) /*!< 1 x TSPIIxSCK */ #define TSPI_NEGATE_1 ((uint32_t)0x00000000) /*!< 1 x TSPIIxSCK */
@ -638,7 +661,7 @@ extern "C" {
/** /**
* @defgroup TSPI_ParityEnable Parity Enable * @defgroup TSPI_ParityEnable Parity Enable
* @brief Enable/Disable Parity Macro Definisiton. * @brief Enable/Disable Parity Macro Definition.
* @{ * @{
*/ */
#define TSPI_PARITY_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define TSPI_PARITY_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -650,7 +673,7 @@ extern "C" {
/** /**
* @defgroup TSPI_ParityBit Parity Bit * @defgroup TSPI_ParityBit Parity Bit
* @brief Parity Bit Macro Definisiton. * @brief Parity Bit Macro Definition.
* @{ * @{
*/ */
#define TSPI_PARITY_BIT_ODD ((uint32_t)0x00000000) /*!< Odd Parity */ #define TSPI_PARITY_BIT_ODD ((uint32_t)0x00000000) /*!< Odd Parity */
@ -662,7 +685,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Status_Setting_flag Status Setting Flag * @defgroup TSPI_Status_Setting_flag Status Setting Flag
* @brief Enable/Disable Status Setting Flag Macro Definisiton. * @brief Enable/Disable Status Setting Flag Macro Definition.
* @{ * @{
*/ */
#define TSPI_STATUS_SETTING_ENABLE ((uint32_t)0x00000000) /*!< Setting Enable */ #define TSPI_STATUS_SETTING_ENABLE ((uint32_t)0x00000000) /*!< Setting Enable */
@ -674,7 +697,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TxState Transmitting State Flag * @defgroup TSPI_TxState Transmitting State Flag
* @brief Transmitting State Flag Macro Definisiton. * @brief Transmitting State Flag Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_FLAG_STOP ((uint32_t)0x00000000) /*!< Not Sending Data */ #define TSPI_TX_FLAG_STOP ((uint32_t)0x00000000) /*!< Not Sending Data */
@ -687,7 +710,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TxDone Transmitting Complete Flag * @defgroup TSPI_TxDone Transmitting Complete Flag
* @brief Transmitting Complete Flag Macro Definisiton. * @brief Transmitting Complete Flag Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_DONE_FLAG ((uint32_t)0x00400000) /*!< Send Data Complete Flag */ #define TSPI_TX_DONE_FLAG ((uint32_t)0x00400000) /*!< Send Data Complete Flag */
@ -699,8 +722,8 @@ extern "C" {
/** /**
* @defgroup TSPI_TxFIFOInterruptFlag Transmitting FIFO Interrpt Flag * @defgroup TSPI_TxFIFOInterruptFlag Transmitting FIFO Interrupt Flag
* @brief Transmitting FIFO Interrpt Flag Macro Definisiton. * @brief Transmitting FIFO Interrupt Flag Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_FIFO_INT_STOP ((uint32_t)0x00000000) /*!< Not active Interrupt */ #define TSPI_TX_FIFO_INT_STOP ((uint32_t)0x00000000) /*!< Not active Interrupt */
@ -712,7 +735,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TxFIFOEmptyFlag Transmitting FIFO Empty Flag * @defgroup TSPI_TxFIFOEmptyFlag Transmitting FIFO Empty Flag
* @brief Transmitting FIFO Empty Flag Macro Definisiton. * @brief Transmitting FIFO Empty Flag Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_FIFO_NOT_EMP ((uint32_t)0x00000000) /*!< Remain Data in FIFO */ #define TSPI_TX_FIFO_NOT_EMP ((uint32_t)0x00000000) /*!< Remain Data in FIFO */
@ -723,7 +746,7 @@ extern "C" {
/** /**
* @defgroup TSPI_TxReachFillLevel Current Transmitting FIFO Level * @defgroup TSPI_TxReachFillLevel Current Transmitting FIFO Level
* @brief Current Transmitting FIFO Level Macro Definisiton. * @brief Current Transmitting FIFO Level Macro Definition.
* @{ * @{
*/ */
#define TSPI_TX_REACH_FILL_LEVEL_0 ((uint32_t)0x00000000) /*!< 0 */ #define TSPI_TX_REACH_FILL_LEVEL_0 ((uint32_t)0x00000000) /*!< 0 */
@ -742,7 +765,7 @@ extern "C" {
/** /**
* @defgroup TSPI_RxState Receive State Flag * @defgroup TSPI_RxState Receive State Flag
* @brief Receive State Flag Macro Definisiton. * @brief Receive State Flag Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_FLAG_STOP ((uint32_t)0x00000000) /*!< Not Sending Data */ #define TSPI_RX_FLAG_STOP ((uint32_t)0x00000000) /*!< Not Sending Data */
@ -755,7 +778,7 @@ extern "C" {
/** /**
* @defgroup TSPI_RxDone Receive Complete Flag * @defgroup TSPI_RxDone Receive Complete Flag
* @brief Receive Complete Flag Macro Definisiton. * @brief Receive Complete Flag Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_DONE_FLAG ((uint32_t)0x00000040) /*!< Receive Data Complete Flag */ #define TSPI_RX_DONE_FLAG ((uint32_t)0x00000040) /*!< Receive Data Complete Flag */
@ -767,8 +790,8 @@ extern "C" {
/** /**
* @defgroup TSPI_RxFIFOInterruptFlag Receiving FIFO Interrpt Flag * @defgroup TSPI_RxFIFOInterruptFlag Receiving FIFO Interrupt Flag
* @brief Rx FIFO Interrpt Flag Macro Definisiton. * @brief Rx FIFO Interrupt Flag Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_FIFO_INT_STOP ((uint32_t)0x00000000) /*!< Not active Interrupt */ #define TSPI_RX_FIFO_INT_STOP ((uint32_t)0x00000000) /*!< Not active Interrupt */
@ -780,7 +803,7 @@ extern "C" {
/** /**
* @defgroup TSPI_RxFIFOFullFlag Receiving FIFO Full Flag * @defgroup TSPI_RxFIFOFullFlag Receiving FIFO Full Flag
* @brief Receiving FIFO Full Flag Macro Definisiton. * @brief Receiving FIFO Full Flag Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_FIFO_NOT_FULL ((uint32_t)0x00000000) /*!< Remain Data in FIFO */ #define TSPI_RX_FIFO_NOT_FULL ((uint32_t)0x00000000) /*!< Remain Data in FIFO */
@ -792,7 +815,7 @@ extern "C" {
/** /**
* @defgroup TSPI_RxReachFillLevel Current Receive FIFO Level * @defgroup TSPI_RxReachFillLevel Current Receive FIFO Level
* @brief Current Receive FIFO Level Macro Definisiton. * @brief Current Receive FIFO Level Macro Definition.
* @{ * @{
*/ */
#define TSPI_RX_REACH_FILL_LEVEL_0 ((uint32_t)0x00000000) /*!< 0 */ #define TSPI_RX_REACH_FILL_LEVEL_0 ((uint32_t)0x00000000) /*!< 0 */
@ -810,8 +833,8 @@ extern "C" {
/** /**
* @defgroup TSPI_TRGErr Triger Error * @defgroup TSPI_TRGErr Trigger Error
* @brief Triger Error Macro Definisiton. * @brief Trigger Error Macro Definition.
* @{ * @{
*/ */
#define TSPI_TRGERR_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define TSPI_TRGERR_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -823,7 +846,7 @@ extern "C" {
/** /**
* @defgroup TSPI_UnderrunErr Underrun Error * @defgroup TSPI_UnderrunErr Underrun Error
* @brief Underrun Error Macro Definisiton. * @brief Underrun Error Macro Definition.
* @{ * @{
*/ */
#define TSPI_UNDERRUN_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define TSPI_UNDERRUN_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -835,7 +858,7 @@ extern "C" {
/** /**
* @defgroup TSPI_OverrunErr Overrun Error * @defgroup TSPI_OverrunErr Overrun Error
* @brief Overrun Error Macro Definisiton. * @brief Overrun Error Macro Definition.
* @{ * @{
*/ */
#define TSPI_OVERRUN_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define TSPI_OVERRUN_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -848,7 +871,7 @@ extern "C" {
/** /**
* @defgroup TSPI_ParityErr Parity Error * @defgroup TSPI_ParityErr Parity Error
* @brief Parity Error Macro Definisiton. * @brief Parity Error Macro Definition.
* @{ * @{
*/ */
#define TSPI_PARITY_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define TSPI_PARITY_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -860,7 +883,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Data_allign Data allign * @defgroup TSPI_Data_allign Data allign
* @brief Data allign Macro Definisiton. * @brief Data allign Macro Definition.
* @{ * @{
*/ */
#define TSPI_DATA_ALLIGN_8 ((uint32_t)0x00000000) /*!< Data length byte */ #define TSPI_DATA_ALLIGN_8 ((uint32_t)0x00000000) /*!< Data length byte */
@ -882,7 +905,7 @@ extern "C" {
/** /**
* @defgroup TSPI_ErrCode Error Code * @defgroup TSPI_ErrCode Error Code
* @brief Error Code Macro Definisiton. * @brief Error Code Macro Definition.
* @{ * @{
*/ */
#define NOERROR ((uint32_t)0x00000000) /*!< no error */ #define NOERROR ((uint32_t)0x00000000) /*!< no error */
@ -902,7 +925,7 @@ extern "C" {
/** /**
* @defgroup TSPI_Buffer_Size Receive Buffer size * @defgroup TSPI_Buffer_Size Receive Buffer size
* @brief Error Code Macro Definisiton. * @brief Error Code Macro Definition.
* @{ * @{
*/ */
#define BUFFSIZE ((uint32_t)0x000000010 /*!< Buffer Size */ #define BUFFSIZE ((uint32_t)0x000000010 /*!< Buffer Size */
@ -934,8 +957,8 @@ extern "C" {
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_receive8_t * @struct tspi_receive8_t
* @brief Receive event information structure definenition. * @brief Receive event information structure definition.
* @brief When data length definenition is "8bit"( @ref TSPI_DataLength ), use this. * @brief When data length definition is "8bit"( @ref TSPI_DataLength ), use this.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -947,8 +970,8 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_receive16_t * @struct tspi_receive16_t
* @brief Receive event information structure definenition. * @brief Receive event information structure definition.
* @brief When data length definenition is "9 - 16 bit"( @ref TSPI_DataLength ), use this. * @brief When data length definition is "9 - 16 bit"( @ref TSPI_DataLength ), use this.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -959,8 +982,8 @@ typedef struct
/** /**
* @struct tspi_receive32_t * @struct tspi_receive32_t
* @brief Receive event information structure definenition. * @brief Receive event information structure definition.
* @brief When data length definenition is "17 - 32 bit"( @ref TSPI_DataLength ), use this. * @brief When data length definition is "17 - 32 bit"( @ref TSPI_DataLength ), use this.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -972,7 +995,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_receive_t * @struct tspi_receive_t
* @brief Receive event information structure definenition. * @brief Receive event information structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef union typedef union
@ -985,8 +1008,8 @@ typedef union
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_transmit8_t * @struct tspi_transmit8_t
* @brief Transmit data information structure definenition. * @brief Transmit data information structure definition.
* @brief When data length definenition is "8bit"( @ref TSPI_DataLength ), use this. * @brief When data length definition is "8bit"( @ref TSPI_DataLength ), use this.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -998,8 +1021,8 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_transmit16_t * @struct tspi_transmit16_t
* @brief Transmit data information structure definenition. * @brief Transmit data information structure definition.
* @brief When data length definenition is "9 - 16 bit"( @ref TSPI_DataLength ), use this. * @brief When data length definition is "9 - 16 bit"( @ref TSPI_DataLength ), use this.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -1010,8 +1033,8 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_transmit32_t * @struct tspi_transmit32_t
* @brief Transmit data information structure definenition. * @brief Transmit data information structure definition.
* @brief When data length definenition is "17 - 32 bit"( @ref TSPI_DataLength ), use this. * @brief When data length definition is "17 - 32 bit"( @ref TSPI_DataLength ), use this.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -1023,7 +1046,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_transmit_t * @struct tspi_transmit_t
* @brief Transmit data information structure definenition. * @brief Transmit data information structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef union typedef union
@ -1036,13 +1059,13 @@ typedef union
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_control1_t * @struct tspi_control1_t
* @brief Control Setting structure definenition. * @brief Control Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
{ {
uint32_t trgen; /*!< TRGEN Transmission Triger Control. uint32_t trgen; /*!< TRGEN Transmission Trigger Control.
: Use @ref TSPI_Triger_Control */ : Use @ref TSPI_Trigger_Control */
uint32_t trxe; /*!< TRXE Transmission Control. uint32_t trxe; /*!< TRXE Transmission Control.
: Use @ref TSPI_Transmission_Control */ : Use @ref TSPI_Transmission_Control */
uint32_t tspims; /*!< TSPI/SIO Transmission Mode. uint32_t tspims; /*!< TSPI/SIO Transmission Mode.
@ -1054,13 +1077,13 @@ typedef struct
uint32_t cssel; /*!< CSSEL Select. uint32_t cssel; /*!< CSSEL Select.
: Use @ref TSPI_CSSEL_Select */ : Use @ref TSPI_CSSEL_Select */
uint32_t fc; /*!< Transfer Frame Value. uint32_t fc; /*!< Transfer Frame Value.
: Range ( TSPI_TRANS_RANGE_SINGLE <= N =< TSPI_TRANS_RANGE_MAX ) @ref TSPI_Transfer_Frame_Range */ : Range ( TSPI_TRANS_RANGE_CONTINUE <= N =< TSPI_TRANS_RANGE_MAX ) @ref TSPI_Transfer_Frame_Range */
} tspi_control1_t; } tspi_control1_t;
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_control2_t * @struct tspi_control2_t
* @brief Control Setting structure definenition. * @brief Control Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -1094,7 +1117,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_control3_t * @struct tspi_control3_t
* @brief Control Setting structure definenition. * @brief Control Setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -1108,7 +1131,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_baudrate_t * @struct tspi_baudrate_t
* @brief Clock setting structure definenition. * @brief Clock setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -1161,7 +1184,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
{ {
uint32_t reserved; /*!< SIO Slave MOde. uint32_t reserved; /*!< SIO Slave Mode.
: */ : */
uint32_t vpe; /*!< Enable/Disable Parity Function. uint32_t vpe; /*!< Enable/Disable Parity Function.
: Use @ref TSPI_ParityEnable */ : Use @ref TSPI_ParityEnable */
@ -1183,7 +1206,7 @@ typedef struct
: Use @ref TSPI_TxState */ : Use @ref TSPI_TxState */
uint32_t txend; /*!< Tx Data Send Complete Flag. uint32_t txend; /*!< Tx Data Send Complete Flag.
: Use @ref TSPI_TxDone */ : Use @ref TSPI_TxDone */
uint32_t inttxwf; /*!< Tx FIFO Interrpt Flag. uint32_t inttxwf; /*!< Tx FIFO Interrupt Flag.
: Use @ref TSPI_TxFIFOInterruptFlag */ : Use @ref TSPI_TxFIFOInterruptFlag */
uint32_t tfemp; /*!< Tx FIFO Empty Flag. uint32_t tfemp; /*!< Tx FIFO Empty Flag.
: Use @ref TSPI_TxFIFOEmptyFlag */ : Use @ref TSPI_TxFIFOEmptyFlag */
@ -1193,7 +1216,7 @@ typedef struct
: Use @ref TSPI_RxState */ : Use @ref TSPI_RxState */
uint32_t rxend; /*!< Rx Data Receive Complete Flag. uint32_t rxend; /*!< Rx Data Receive Complete Flag.
: Use @ref TSPI_RxDone */ : Use @ref TSPI_RxDone */
uint32_t intrxff; /*!< Rx FIFO Interrpt Flag uint32_t intrxff; /*!< Rx FIFO Interrupt Flag
: Use @ref TSPI_RxFIFOInterruptFlag */ : Use @ref TSPI_RxFIFOInterruptFlag */
uint32_t rffll; /*!< Rx FIFO Full Flag uint32_t rffll; /*!< Rx FIFO Full Flag
: Use @ref TSPI_RxFIFOFullFlag */ : Use @ref TSPI_RxFIFOFullFlag */
@ -1221,7 +1244,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @struct tspi_initial_setting_t * @struct tspi_initial_setting_t
* @brief Initial setting structure definenition. * @brief Initial setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -1243,7 +1266,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief TSPI handle structure definenition. * @brief TSPI handle structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct tspi_handle typedef struct tspi_handle
@ -1253,19 +1276,19 @@ typedef struct tspi_handle
uint32_t errcode; /*!< ErrorCode */ uint32_t errcode; /*!< ErrorCode */
/*------------------------------------------*/ /*------------------------------------------*/
/*! /*!
@brief Transmit Informatin. @brief Transmit Information.
*/ */
/*------------------------------------------*/ /*------------------------------------------*/
struct struct
{ {
uint32_t rp; /*!< Num of transmited data. */ uint32_t rp; /*!< Num of transmitted data. */
tspi_transmit_t info; /*!< Transmit Data Information. */ tspi_transmit_t info; /*!< Transmit Data Information. */
uint8_t tx_allign; /*!< Transmit Data length Information. */ uint8_t tx_allign; /*!< Transmit Data length Information. */
void (*handler)(uint32_t id, TXZ_Result result); /*!< Transmit Event handler. */ void (*handler)(uint32_t id, TXZ_Result result); /*!< Transmit Event handler. */
} transmit; } transmit;
/*------------------------------------------*/ /*------------------------------------------*/
/*! /*!
@brief Receive Informatin. @brief Receive Information.
*/ */
/*------------------------------------------*/ /*------------------------------------------*/
struct struct

View File

@ -5,9 +5,31 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-07-21 15:39:36 #$ * $Date:: 2017-07-21 15:39:36 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@ -119,7 +141,7 @@ extern "C" {
/** /**
* @defgroup UART_CTSHandshake CTS Handshake * @defgroup UART_CTSHandshake CTS Handshake
* @brief Available CTS Handshake Macro Definisiton. * @brief Available CTS Handshake Macro Definition.
* @{ * @{
*/ */
#define UART_CTS_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define UART_CTS_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -131,7 +153,7 @@ extern "C" {
/** /**
* @defgroup UART_RTSHandshake RTS Handshake * @defgroup UART_RTSHandshake RTS Handshake
* @brief Available RTS Handshake Macro Definisiton. * @brief Available RTS Handshake Macro Definition.
* @{ * @{
*/ */
#define UART_RTS_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define UART_RTS_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -143,7 +165,7 @@ extern "C" {
/** /**
* @defgroup UART_DataComplementation Data Complementation * @defgroup UART_DataComplementation Data Complementation
* @brief Enable/Disable Data Signal Complementation Macro Definisiton. * @brief Enable/Disable Data Signal Complementation Macro Definition.
* @{ * @{
*/ */
#define UART_DATA_COMPLEMENTION_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define UART_DATA_COMPLEMENTION_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -155,7 +177,7 @@ extern "C" {
/** /**
* @defgroup UART_DataDirection Data Direction * @defgroup UART_DataDirection Data Direction
* @brief Data Direction Macro Definisiton. * @brief Data Direction Macro Definition.
* @{ * @{
*/ */
#define UART_DATA_DIRECTION_LSB ((uint32_t)0x00000000) /*!< LSB first */ #define UART_DATA_DIRECTION_LSB ((uint32_t)0x00000000) /*!< LSB first */
@ -167,7 +189,7 @@ extern "C" {
/** /**
* @defgroup UART_StopBit Stop Bit * @defgroup UART_StopBit Stop Bit
* @brief Stop Bit Macro Definisiton. * @brief Stop Bit Macro Definition.
* @{ * @{
*/ */
#define UART_STOP_BIT_1 ((uint32_t)0x00000000) /*!< 1 bit */ #define UART_STOP_BIT_1 ((uint32_t)0x00000000) /*!< 1 bit */
@ -179,7 +201,7 @@ extern "C" {
/** /**
* @defgroup UART_ParityBit Parity Bit * @defgroup UART_ParityBit Parity Bit
* @brief Parity Bit Macro Definisiton. * @brief Parity Bit Macro Definition.
* @{ * @{
*/ */
#define UART_PARITY_BIT_ODD ((uint32_t)0x00000000) /*!< Odd Parity */ #define UART_PARITY_BIT_ODD ((uint32_t)0x00000000) /*!< Odd Parity */
@ -191,7 +213,7 @@ extern "C" {
/** /**
* @defgroup UART_ParityEnable Parity Enable * @defgroup UART_ParityEnable Parity Enable
* @brief Enable/Disable Parity Macro Definisiton. * @brief Enable/Disable Parity Macro Definition.
* @{ * @{
*/ */
#define UART_PARITY_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define UART_PARITY_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -203,7 +225,7 @@ extern "C" {
/** /**
* @defgroup UART_DataLength Data Length * @defgroup UART_DataLength Data Length
* @brief Data Length Macro Definisiton. * @brief Data Length Macro Definition.
* @{ * @{
*/ */
#define UART_DATA_LENGTH_7 ((uint32_t)0x00000000) /*!< 7 bit */ #define UART_DATA_LENGTH_7 ((uint32_t)0x00000000) /*!< 7 bit */
@ -216,7 +238,7 @@ extern "C" {
/** /**
* @defgroup UART_TxFillLevelRange Tx Fill Level Range * @defgroup UART_TxFillLevelRange Tx Fill Level Range
* @brief Transmit Fill Level Range Macro Definisiton. * @brief Transmit Fill Level Range Macro Definition.
* @brief Range of Value be set "(UART_TX_FILL_LEVEL_MIN <= Value <= UART_TX_FILL_LEVEL_MAX)". * @brief Range of Value be set "(UART_TX_FILL_LEVEL_MIN <= Value <= UART_TX_FILL_LEVEL_MAX)".
* @{ * @{
*/ */
@ -229,7 +251,7 @@ extern "C" {
/** /**
* @defgroup UART_RxFillLevelRange Rx Fill Level Range * @defgroup UART_RxFillLevelRange Rx Fill Level Range
* @brief Receive Fill Level Range Macro Definisiton. * @brief Receive Fill Level Range Macro Definition.
* @brief Range of Value be set "(UART_RX_FILL_LEVEL_MIN <= Value <= UART_RX_FILL_LEVEL_MAX)". * @brief Range of Value be set "(UART_RX_FILL_LEVEL_MIN <= Value <= UART_RX_FILL_LEVEL_MAX)".
* @{ * @{
*/ */
@ -241,8 +263,8 @@ extern "C" {
/** /**
* @defgroup UART_TxFIFOInterrupt Tx FIFO Interrpt * @defgroup UART_TxFIFOInterrupt Tx FIFO Interrupt
* @brief Available Transmit FIFO Interrupt Macro Definisiton. * @brief Available Transmit FIFO Interrupt Macro Definition.
* @{ * @{
*/ */
#define UART_TX_FIFO_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define UART_TX_FIFO_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -253,8 +275,8 @@ extern "C" {
/** /**
* @defgroup UART_TxInterrupt Tx Interrpt * @defgroup UART_TxInterrupt Tx Interrupt
* @brief Available Transmit Interrupt Macro Definisiton. * @brief Available Transmit Interrupt Macro Definition.
* @{ * @{
*/ */
#define UART_TX_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define UART_TX_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -265,8 +287,8 @@ extern "C" {
/** /**
* @defgroup UART_RxFIFOInterrupt Rx FIFO Interrpt * @defgroup UART_RxFIFOInterrupt Rx FIFO Interrupt
* @brief Available Receive FIFO Interrupt Macro Definisiton. * @brief Available Receive FIFO Interrupt Macro Definition.
* @{ * @{
*/ */
#define UART_RX_FIFO_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define UART_RX_FIFO_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -277,8 +299,8 @@ extern "C" {
/** /**
* @defgroup UART_RxInterrupt Rx Interrpt * @defgroup UART_RxInterrupt Rx Interrupt
* @brief Available Receive Interrupt Macro Definisiton. * @brief Available Receive Interrupt Macro Definition.
* @{ * @{
*/ */
#define UART_RX_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */ #define UART_RX_INT_DISABLE ((uint32_t)0x00000000) /*!< Not Available. */
@ -290,7 +312,7 @@ extern "C" {
/** /**
* @defgroup UART_ErrorInterrupt Error Interrupt * @defgroup UART_ErrorInterrupt Error Interrupt
* @brief Enable/Disable Error Interrupt Macro Definisiton. * @brief Enable/Disable Error Interrupt Macro Definition.
* @{ * @{
*/ */
#define UART_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define UART_ERR_INT_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -302,7 +324,7 @@ extern "C" {
/** /**
* @defgroup UART_Prescaler Prescaler * @defgroup UART_Prescaler Prescaler
* @brief Prescaler Macro Definisiton. * @brief Prescaler Macro Definition.
* @{ * @{
*/ */
#define UART_PLESCALER_1 ((uint32_t)0x00000000) /*!< 1/1 */ #define UART_PLESCALER_1 ((uint32_t)0x00000000) /*!< 1/1 */
@ -322,7 +344,7 @@ extern "C" {
/** /**
* @defgroup UART_Clock_Mask Clock Mask * @defgroup UART_Clock_Mask Clock Mask
* @brief Clock Mask Macro Definisiton. * @brief Clock Mask Macro Definition.
* @{ * @{
*/ */
#define UART_UARTxCLK_MASK ((uint32_t)0x00000000) /*!< [1:0] is always 0 */ #define UART_UARTxCLK_MASK ((uint32_t)0x00000000) /*!< [1:0] is always 0 */
@ -333,7 +355,7 @@ extern "C" {
/** /**
* @defgroup UART_Division Division * @defgroup UART_Division Division
* @brief Enable/Disable Division Macro Definisiton. * @brief Enable/Disable Division Macro Definition.
* @{ * @{
*/ */
#define UART_DIVISION_DISABLE ((uint32_t)0x00000000) /*!< Disable */ #define UART_DIVISION_DISABLE ((uint32_t)0x00000000) /*!< Disable */
@ -345,7 +367,7 @@ extern "C" {
/** /**
* @defgroup UART_RangeK Range K * @defgroup UART_RangeK Range K
* @brief Range of K Macro Definisiton. * @brief Range of K Macro Definition.
* @brief Range of K be set "(UART_RANGE_K_MIN <= Value <= UART_RANGE_K_MAX)". * @brief Range of K be set "(UART_RANGE_K_MIN <= Value <= UART_RANGE_K_MAX)".
* @{ * @{
*/ */
@ -358,7 +380,7 @@ extern "C" {
/** /**
* @defgroup UART_RangeN Range N * @defgroup UART_RangeN Range N
* @brief Range of N Macro Definisiton. * @brief Range of N Macro Definition.
* @brief Range of N be set "(UART_RANGE_N_MIN <= Value <= UART_RANGE_N_MAX)". * @brief Range of N be set "(UART_RANGE_N_MIN <= Value <= UART_RANGE_N_MAX)".
* @{ * @{
*/ */
@ -371,7 +393,7 @@ extern "C" {
/** /**
* @defgroup UART_SettingEnable Setting Enable * @defgroup UART_SettingEnable Setting Enable
* @brief Enable/Disable Setting Macro Definisiton. * @brief Enable/Disable Setting Macro Definition.
* @{ * @{
*/ */
#define UART_SETTING_MASK ((uint32_t)0x80000000) /*!< for Mask */ #define UART_SETTING_MASK ((uint32_t)0x80000000) /*!< for Mask */
@ -384,7 +406,7 @@ extern "C" {
/** /**
* @defgroup UART_TxState Tx State * @defgroup UART_TxState Tx State
* @brief Transmitting State Macro Definisiton. * @brief Transmitting State Macro Definition.
* @{ * @{
*/ */
#define UART_TX_STATE_MASK ((uint32_t)0x00008000) /*!< for Mask */ #define UART_TX_STATE_MASK ((uint32_t)0x00008000) /*!< for Mask */
@ -397,7 +419,7 @@ extern "C" {
/** /**
* @defgroup UART_TxDone Transmitting Done * @defgroup UART_TxDone Transmitting Done
* @brief Transmitting Done Macro Definisiton. * @brief Transmitting Done Macro Definition.
* @{ * @{
*/ */
#define UART_TX_MASK ((uint32_t)0x00004000) /*!< for Mask */ #define UART_TX_MASK ((uint32_t)0x00004000) /*!< for Mask */
@ -409,7 +431,7 @@ extern "C" {
/** /**
* @defgroup UART_TxReachFillLevel Tx Reach Fill Level * @defgroup UART_TxReachFillLevel Tx Reach Fill Level
* @brief Reach Transmitting Fill Level Macro Definisiton. * @brief Reach Transmitting Fill Level Macro Definition.
* @{ * @{
*/ */
#define UART_TX_REACH_FILL_MASK ((uint32_t)0x00002000) /*!< for Mask */ #define UART_TX_REACH_FILL_MASK ((uint32_t)0x00002000) /*!< for Mask */
@ -421,7 +443,7 @@ extern "C" {
/** /**
* @defgroup UART_TxFifoLevel Tx FIFO Fill Level * @defgroup UART_TxFifoLevel Tx FIFO Fill Level
* @brief Transmitting FIFO Fill Level Macro Definisiton. * @brief Transmitting FIFO Fill Level Macro Definition.
* @{ * @{
*/ */
#define UART_TX_FIFO_LEVEL_MASK ((uint32_t)0x00000F00) /*!< for Mask */ #define UART_TX_FIFO_LEVEL_MASK ((uint32_t)0x00000F00) /*!< for Mask */
@ -432,7 +454,7 @@ extern "C" {
/** /**
* @defgroup UART_RxState Rx State * @defgroup UART_RxState Rx State
* @brief Receive State Macro Definisiton. * @brief Receive State Macro Definition.
* @{ * @{
*/ */
#define UART_RX_STATE_MASK ((uint32_t)0x00000080) /*!< for Mask */ #define UART_RX_STATE_MASK ((uint32_t)0x00000080) /*!< for Mask */
@ -445,7 +467,7 @@ extern "C" {
/** /**
* @defgroup UART_RxDone Rx Done * @defgroup UART_RxDone Rx Done
* @brief Receive Done Macro Definisiton. * @brief Receive Done Macro Definition.
* @{ * @{
*/ */
#define UART_RX_MASK ((uint32_t)0x00000040) /*!< for Mask */ #define UART_RX_MASK ((uint32_t)0x00000040) /*!< for Mask */
@ -457,7 +479,7 @@ extern "C" {
/** /**
* @defgroup UART_RxReachFillLevel Rx Reach Fill Level * @defgroup UART_RxReachFillLevel Rx Reach Fill Level
* @brief Reach Receive Fill Level Macro Definisiton. * @brief Reach Receive Fill Level Macro Definition.
* @{ * @{
*/ */
#define UART_RX_REACH_FILL_MASK ((uint32_t)0x00000020) /*!< for Mask */ #define UART_RX_REACH_FILL_MASK ((uint32_t)0x00000020) /*!< for Mask */
@ -469,7 +491,7 @@ extern "C" {
/** /**
* @defgroup UART_RxFifoLevel Rx FIFO Fill Level * @defgroup UART_RxFifoLevel Rx FIFO Fill Level
* @brief Receive FIFO Fill Level Macro Definisiton. * @brief Receive FIFO Fill Level Macro Definition.
* @{ * @{
*/ */
#define UART_RX_FIFO_LEVEL_MASK ((uint32_t)0x0000000F) /*!< for Mask */ #define UART_RX_FIFO_LEVEL_MASK ((uint32_t)0x0000000F) /*!< for Mask */
@ -480,7 +502,7 @@ extern "C" {
/** /**
* @defgroup UART_TriggerErr Trigger Error * @defgroup UART_TriggerErr Trigger Error
* @brief Trigger Error Macro Definisiton. * @brief Trigger Error Macro Definition.
* @{ * @{
*/ */
#define UART_TRIGGER_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define UART_TRIGGER_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -492,7 +514,7 @@ extern "C" {
/** /**
* @defgroup UART_OverrunErr Overrun Error * @defgroup UART_OverrunErr Overrun Error
* @brief Overrun Error Macro Definisiton. * @brief Overrun Error Macro Definition.
* @{ * @{
*/ */
#define UART_OVERRUN_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define UART_OVERRUN_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -504,7 +526,7 @@ extern "C" {
/** /**
* @defgroup UART_ParityErr Parity Error * @defgroup UART_ParityErr Parity Error
* @brief Parity Error Macro Definisiton. * @brief Parity Error Macro Definition.
* @{ * @{
*/ */
#define UART_PARITY_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define UART_PARITY_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -516,7 +538,7 @@ extern "C" {
/** /**
* @defgroup UART_FramingErr Framing Error * @defgroup UART_FramingErr Framing Error
* @brief Framing Error Macro Definisiton. * @brief Framing Error Macro Definition.
* @{ * @{
*/ */
#define UART_FRAMING_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define UART_FRAMING_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -528,7 +550,7 @@ extern "C" {
/** /**
* @defgroup UART_BreakErr Break Error * @defgroup UART_BreakErr Break Error
* @brief Break Error Macro Definisiton. * @brief Break Error Macro Definition.
* @{ * @{
*/ */
#define UART_BREAK_NO_ERR ((uint32_t)0x00000000) /*!< No Error */ #define UART_BREAK_NO_ERR ((uint32_t)0x00000000) /*!< No Error */
@ -565,8 +587,8 @@ extern "C" {
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Receive event information structure definenition. * @brief Receive event information structure definition.
* @brief When data length definenition is "7 or 8bit"( @ref UART_DataLength ), use this. * @brief When data length definition is "7 or 8bit"( @ref UART_DataLength ), use this.
* @attention "num" must be over FIFO max num. * @attention "num" must be over FIFO max num.
*/ */
/*----------------------------------*/ /*----------------------------------*/
@ -578,8 +600,8 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Receive event information structure definenition. * @brief Receive event information structure definition.
* @brief When data length definenition is "9bit"( @ref UART_DataLength ), use this. * @brief When data length definition is "9bit"( @ref UART_DataLength ), use this.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -590,7 +612,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Receive event information structure definenition. * @brief Receive event information structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef union typedef union
@ -601,8 +623,8 @@ typedef union
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Transmit data information structure definenition. * @brief Transmit data information structure definition.
* @brief When data length definenition is "7 or 8bit"( @ref UART_DataLength ), use this. * @brief When data length definition is "7 or 8bit"( @ref UART_DataLength ), use this.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -613,8 +635,8 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Transmit data information structure definenition. * @brief Transmit data information structure definition.
* @brief When data length definenition is "9bit"( @ref UART_DataLength ), use this. * @brief When data length definition is "9bit"( @ref UART_DataLength ), use this.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -626,7 +648,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Transmit data information structure definenition. * @brief Transmit data information structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef union typedef union
@ -637,7 +659,7 @@ typedef union
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Clock setting structure definenition. * @brief Clock setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -648,12 +670,12 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Boudrate setting structure definenition. * @brief Boudrate setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
{ {
uint32_t ken; /*!< Enable/Disable Division Definisiton. uint32_t ken; /*!< Enable/Disable Division Definition.
: Use @ref UART_Division */ : Use @ref UART_Division */
uint32_t brk; /*!< Division Value K. uint32_t brk; /*!< Division Value K.
: K Range ( UART_RANGE_K_MIN <= K =< UART_RANGE_K_MAX ) @ref UART_RangeK */ : K Range ( UART_RANGE_K_MIN <= K =< UART_RANGE_K_MAX ) @ref UART_RangeK */
@ -689,7 +711,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief Initial setting structure definenition. * @brief Initial setting structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -739,7 +761,7 @@ typedef struct
/*----------------------------------*/ /*----------------------------------*/
/** /**
* @brief UART handle structure definenition. * @brief UART handle structure definition.
*/ */
/*----------------------------------*/ /*----------------------------------*/
typedef struct typedef struct
@ -748,18 +770,18 @@ typedef struct
uart_initial_setting_t init; /*!< Initial setting. */ uart_initial_setting_t init; /*!< Initial setting. */
/*------------------------------------------*/ /*------------------------------------------*/
/*! /*!
@brief Transmit Informatin. @brief Transmit Information.
*/ */
/*------------------------------------------*/ /*------------------------------------------*/
struct struct
{ {
uint32_t rp; /*!< Num of transmited data. */ uint32_t rp; /*!< Num of transmitted data. */
uart_transmit_t info; /*!< Transmit Data Information. */ uart_transmit_t info; /*!< Transmit Data Information. */
void (*handler)(uint32_t id, TXZ_Result result); /*!< Transmit Event handler. */ void (*handler)(uint32_t id, TXZ_Result result); /*!< Transmit Event handler. */
} transmit; } transmit;
/*------------------------------------------*/ /*------------------------------------------*/
/*! /*!
@brief Receive Informatin. @brief Receive Information.
*/ */
/*------------------------------------------*/ /*------------------------------------------*/
struct struct

View File

@ -5,9 +5,31 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-07-21 15:39:36 #$ * $Date:: 2017-07-21 15:39:36 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@ -368,7 +390,7 @@ extern "C" {
/* Inline Functions */ /* Inline Functions */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/** /**
* @addtogroup UART_Private_fuctions * @addtogroup UART_Private_functions
* @{ * @{
*/ */
__STATIC_INLINE void disable_UARTxTRANS_TXE(TSB_UART_TypeDef *p_instance); __STATIC_INLINE void disable_UARTxTRANS_TXE(TSB_UART_TypeDef *p_instance);

View File

@ -1,13 +1,35 @@
/** /**
******************************************************************************* *******************************************************************************
* @file adc.c * @file txz_adc.c
* @brief This file provides API functions for ADC driver. * @brief This file provides API functions for ADC driver.
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-09-07 13:52:12 #$ * $Date:: 2017-09-07 13:52:12 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
@ -18,9 +40,9 @@
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Includes */ /* Includes */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
#include "adc_include.h" #include "txz_adc_include.h"
#include "adc_ch.h" #include "txz_adc_ch.h"
#include "adc.h" #include "txz_adc.h"
#if defined(__ADC_H) #if defined(__ADC_H)
/** /**

View File

@ -1,17 +1,38 @@
/** /**
******************************************************************************* *******************************************************************************
* @file adc_ch.c * @file txz_adc_ch.c
* @brief This file provides API functions for ADC driver. \n * @brief This file provides API functions for ADC driver. \n
* Channel Class. * Channel Class.
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-09-07 13:52:12 #$ * $Date:: 2017-09-07 13:52:12 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -19,10 +40,10 @@
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Includes */ /* Includes */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
#include "adc_include.h" #include "txz_adc_include.h"
#include "adc_ch.h" #include "txz_adc_ch.h"
#if defined(__ADC_CH_H) #if defined(__TXZ_ADC_CH_H)
/** /**
* @addtogroup Periph_Driver Peripheral Driver * @addtogroup Periph_Driver Peripheral Driver
* @{ * @{

View File

@ -5,12 +5,33 @@
* @version V1.0.0.1 * @version V1.0.0.1
* $Date:: 2018-04-04 18:04:44 #$ * $Date:: 2018-04-04 18:04:44 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -2,12 +2,34 @@
******************************************************************************* *******************************************************************************
* @file fc.c * @file fc.c
* @brief Flash_Userboot Sample Application. * @brief Flash_Userboot Sample Application.
* @version V1.0.1.0 * @version V1.0.0.0
* $Date:: 2017-06-23 13:52:12 #$ * $Date:: 2018-09-21 11:11:53 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
@ -18,7 +40,7 @@
/* Includes */ /* Includes */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
#include <string.h> #include <string.h>
#include "tmpm4g9_fc.h" #include "txz_fc.h"
//#include "txz_sample_def.h" //#include "txz_sample_def.h"
/** /**
@ -184,6 +206,7 @@ __ramfunc
__STATIC_INLINE TXZ_Result fc_enable_areasel(void) __STATIC_INLINE TXZ_Result fc_enable_areasel(void)
{ {
TXZ_Result retval = TXZ_ERROR; TXZ_Result retval = TXZ_ERROR;
/* Writes the FCKER register the KEYCODE. */ /* Writes the FCKER register the KEYCODE. */
TSB_FC->KCR = FC_KCR_KEYCODE; TSB_FC->KCR = FC_KCR_KEYCODE;
@ -373,9 +396,9 @@ static TXZ_Result fc_erase_command(uint32_t* flash_top_address, uint32_t* erase_
addr2 = (uint32_t *) ((uint32_t)flash_top_address + FC_CMD_BC2_ADDR + 0x100000); addr2 = (uint32_t *) ((uint32_t)flash_top_address + FC_CMD_BC2_ADDR + 0x100000);
} }
volatile uint32_t *addr3 = (uint32_t *) erase_top_address; volatile uint32_t *addr3 = (uint32_t *) erase_top_address;
/* Enables the AREA0. Write Mode. */ /* Enables the AREA0. Write Mode. */
retval = fc_enable_areasel(); retval = fc_enable_areasel();
// printf("Areasel done\n\r");
if(retval == TXZ_SUCCESS){ if(retval == TXZ_SUCCESS){
*addr1 = (0x000000AAUL); *addr1 = (0x000000AAUL);
@ -396,6 +419,7 @@ static TXZ_Result fc_erase_command(uint32_t* flash_top_address, uint32_t* erase_
/* Disables the AREA0. Read Mode. */ /* Disables the AREA0. Read Mode. */
retval = fc_disable_areasel(); retval = fc_disable_areasel();
return retval; return retval;
} }

View File

@ -5,12 +5,33 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-08-06 10:43:01 #$ * $Date:: 2017-08-06 10:43:01 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -895,6 +916,7 @@ TXZ_Result fuart_receiveIt(fuart_t *p_obj, fuart_receive_t *p_info)
while((fr_reg & FUARTxFR_RXFE_MASK) == FUARTxFR_RXFE_FLAG_CLR) while((fr_reg & FUARTxFR_RXFE_MASK) == FUARTxFR_RXFE_FLAG_CLR)
{ {
dummy = (uint8_t)(p_obj->p_instance->DR & FUARTxDR_DR_8BIT_MASK); dummy = (uint8_t)(p_obj->p_instance->DR & FUARTxDR_DR_8BIT_MASK);
(void)dummy;
if(p_obj->init.fifo == 1) if(p_obj->init.fifo == 1)
{ {
if(++rx_count > FUART_RX_FIFO_MAX) if(++rx_count > FUART_RX_FIFO_MAX)
@ -1122,6 +1144,7 @@ void fuart_error_irq_handler(fuart_t *p_obj)
icr_reg |= FUARTxICR_OEIC_CLR; icr_reg |= FUARTxICR_OEIC_CLR;
ecr_reg |= FUARTxECR_OE_CLR; ecr_reg |= FUARTxECR_OE_CLR;
dummy = (uint8_t)(p_obj->p_instance->DR & FUARTxDR_DR_8BIT_MASK); dummy = (uint8_t)(p_obj->p_instance->DR & FUARTxDR_DR_8BIT_MASK);
(void)dummy;
err = TXZ_ERROR; err = TXZ_ERROR;
} }
/* BREAK */ /* BREAK */

View File

@ -6,12 +6,33 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-08-06 10:43:01 #$ * $Date:: 2017-08-06 10:43:01 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -5,12 +5,33 @@
* @version V1.0.0.2 * @version V1.0.0.2
* $Date:: 2018-04-11 14:13:48 #$ * $Date:: 2018-04-11 14:13:48 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENCE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -4039,6 +4060,7 @@ TXZ_Result gpio_read_mode(_gpio_t *p_obj, uint32_t group, uint32_t mode, uint32_
#endif /* TMPM4G9 */ #endif /* TMPM4G9 */
default: default:
result = TXZ_ERROR; result = TXZ_ERROR;
break;
} }
} }
@ -4283,6 +4305,7 @@ TXZ_Result gpio_func(_gpio_t *p_obj, gpio_gr_t group, gpio_num_t num, uint32_t f
#endif /* TMPM4G9 */ #endif /* TMPM4G9 */
default: default:
result = TXZ_ERROR; result = TXZ_ERROR;
break;
} }
if(result == TXZ_ERROR) if(result == TXZ_ERROR)
{ {

View File

@ -5,12 +5,33 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2017-08-09 11:01:04 #$ * $Date:: 2017-08-09 11:01:04 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -5,12 +5,33 @@
* @version V1.0.0.2 * @version V1.0.0.2
* $Date:: 2016-11-08 00:00:00 #$ * $Date:: 2016-11-08 00:00:00 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -347,7 +368,7 @@ void I2CS_init(I2CS_t *p_obj)
assert_param(IS_POINTER_NOT_NULL(p_obj->p_instance)); assert_param(IS_POINTER_NOT_NULL(p_obj->p_instance));
#endif /* #ifdef DEBUG */ #endif /* #ifdef DEBUG */
p_obj->p_instance->WUPCR1 = (p-obj->init.wup.sgcdi | p_obj->init.wup.ack | p_obj->init.wup.reset | p_obj->init.wup.intend); p_obj->p_instance->WUPCR1 = (p_obj->init.wup.sgcdi | p_obj->init.wup.ack | p_obj->init.wup.reset | p_obj->init.wup.intend);
} }
/*--------------------------------------------------*/ /*--------------------------------------------------*/

View File

@ -5,9 +5,31 @@
* @version V1.0.0.1 * @version V1.0.0.1
* $Date:: 2017-10-03 #$ * $Date:: 2017-10-03 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
@ -656,6 +678,7 @@ __STATIC_INLINE int32_t wait_status(_i2c_t *p_obj)
{ {
volatile uint32_t dummy = 0; volatile uint32_t dummy = 0;
dummy = I2C_read_data(&p_obj->i2c); dummy = I2C_read_data(&p_obj->i2c);
(void)dummy;
return (-5); return (-5);
} }
if ((timeout--) == 0) if ((timeout--) == 0)
@ -667,6 +690,7 @@ __STATIC_INLINE int32_t wait_status(_i2c_t *p_obj)
{ {
volatile uint32_t dummy = 0; volatile uint32_t dummy = 0;
dummy = I2C_read_data(&p_obj->i2c); dummy = I2C_read_data(&p_obj->i2c);
(void)dummy;
return (-5); return (-5);
} }
return (0); return (0);
@ -701,6 +725,7 @@ static void i2c_irq_handler(_i2c_t *p_obj)
if (I2C_transmitter(&p_obj->i2c)) if (I2C_transmitter(&p_obj->i2c))
{ {
int32_t start = I2C_restart(&p_obj->i2c); int32_t start = I2C_restart(&p_obj->i2c);
(void)start;
if (!I2C_get_ack(&p_obj->i2c)) if (!I2C_get_ack(&p_obj->i2c))
{ {
@ -815,6 +840,7 @@ static void i2c_slave_irq_handler(_i2c_t *p_obj)
if (start) if (start)
{ {
uint8_t sa = (uint8_t)I2C_read_data(&p_obj->i2c); uint8_t sa = (uint8_t)I2C_read_data(&p_obj->i2c);
(void)sa;
} }
if (I2C_transmitter(&p_obj->i2c)) if (I2C_transmitter(&p_obj->i2c))
{ {
@ -1606,6 +1632,7 @@ int32_t i2c_slave_receive_t(_i2c_t *p_obj)
if (I2C_slave_detected(&p_obj->i2c)) if (I2C_slave_detected(&p_obj->i2c))
{ {
uint32_t sa = I2C_read_data(&p_obj->i2c); uint32_t sa = I2C_read_data(&p_obj->i2c);
(void)sa;
if (!I2C_transmitter(&p_obj->i2c)) if (!I2C_transmitter(&p_obj->i2c))
{ {

View File

@ -5,12 +5,33 @@
* @version V1.0.0.7 * @version V1.0.0.7
* $Date:: 2018-03-30 13:56:50 #$ * $Date:: 2018-03-30 13:56:50 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -5,12 +5,33 @@
* @version V1.0.0.0 * @version V1.0.0.0
* $Date:: 2018-01-25 17:07:20 #$ * $Date:: 2018-01-25 17:07:20 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENCE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -315,7 +336,7 @@ __INLINE static int32_t check_param_transmit_master(uint32_t param)
switch (param) switch (param)
{ {
case TSPI_MASTER_OPEARTION: case TSPI_MASTER_OPERATION:
case TSPI_SLAVE_OPERATION: case TSPI_SLAVE_OPERATION:
result = PARAM_OK; result = PARAM_OK;
break; break;
@ -398,7 +419,7 @@ __INLINE static int32_t check_param_frame_range(uint32_t param)
{ {
int32_t result = PARAM_NG; int32_t result = PARAM_NG;
if ((TSPI_TRANS_RANGE_SINGLE == param) || (param <= TSPI_TRANS_RANGE_MAX)){ if ((TSPI_TRANS_RANGE_CONTINUE == param) || (TSPI_TRANS_RANGE_SINGLE == param) || (param <= TSPI_TRANS_RANGE_MAX)){
result = PARAM_OK; result = PARAM_OK;
} }
@ -510,7 +531,6 @@ __INLINE static int32_t check_param_rx_fill_level(uint32_t param)
switch (param) switch (param)
{ {
case TSPI_RX_FILL_LEVEL_0:
case TSPI_RX_FILL_LEVEL_1: case TSPI_RX_FILL_LEVEL_1:
case TSPI_RX_FILL_LEVEL_2: case TSPI_RX_FILL_LEVEL_2:
case TSPI_RX_FILL_LEVEL_3: case TSPI_RX_FILL_LEVEL_3:
@ -518,6 +538,7 @@ __INLINE static int32_t check_param_rx_fill_level(uint32_t param)
case TSPI_RX_FILL_LEVEL_5: case TSPI_RX_FILL_LEVEL_5:
case TSPI_RX_FILL_LEVEL_6: case TSPI_RX_FILL_LEVEL_6:
case TSPI_RX_FILL_LEVEL_7: case TSPI_RX_FILL_LEVEL_7:
case TSPI_RX_FILL_LEVEL_8:
result = PARAM_OK; result = PARAM_OK;
break; break;
default: default:

View File

@ -5,12 +5,33 @@
* @version V1.0.0.1 * @version V1.0.0.1
* $Date:: 2018-04-02 19:31:41 #$ * $Date:: 2018-04-02 19:31:41 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -18,7 +21,7 @@
#include "pinmap.h" #include "pinmap.h"
#include "mbed_wait_api.h" #include "mbed_wait_api.h"
#include "mbed_error.h" #include "mbed_error.h"
#include "adc_include.h" #include "txz_adc_include.h"
#define ADC_12BIT_RANGE 0xFFF #define ADC_12BIT_RANGE 0xFFF
#define CONVERSION_FLAG 0x4 #define CONVERSION_FLAG 0x4

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -6,12 +6,33 @@
* @version V1.0.9.0 * @version V1.0.9.0
* $Date:: 2018-04-02 #$ * $Date:: 2018-04-02 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */
/** @addtogroup TOSHIBA_TXZ_MICROCONTROLLER /** @addtogroup TOSHIBA_TXZ_MICROCONTROLLER
* @{ * @{
*/ */

View File

@ -1,15 +1,24 @@
;/** ;/**
; ******************************************************************************* ; *******************************************************************************
; * @file startup_TMPM4G9.s ; * @file startup_TMPM4G9.S
; * @brief CMSIS Cortex-M4 Core Device Startup File for the ; * @brief CMSIS Cortex-M4 Core Device Startup File for the
; * TOSHIBA 'TMPM4G9' Device Series ; * TOSHIBA 'TMPM4G9' Device Series
; * @version V1.0.6.0 ; * @version V1.0.9.0
; * $Date:: 2017-10-04 #$ ; * $Date:: 2018-04-02 #$
; *------- <<< Use Configuration Wizard in Context Menu >>> ------------------
; * ; *
; * DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. ; * SPDX-License-Identifier: Apache-2.0
; * ; *
; * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved ; * Licensed under the Apache License, Version 2.0 (the "License");
; * you may not use this file except in compliance with the License.
; * You may obtain a copy of the License at
; *
; * http://www.apache.org/licenses/LICENSE-2.0
; *
; * Unless required by applicable law or agreed to in writing, software
; * distributed under the License is distributed on an "AS IS" BASIS,
; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; * See the License for the specific language governing permissions and
; * limitations under the License.
; ******************************************************************************* ; *******************************************************************************
; */ ; */
@ -65,7 +74,7 @@ __Vectors DCD |Image$$ARM_LIB_STACK$$ZI$$Limit| ; Top of Stack
DCD INTISDC_IRQHandler ; 21: Interval Sensing Detector Interrupt (Unit C) DCD INTISDC_IRQHandler ; 21: Interval Sensing Detector Interrupt (Unit C)
DCD INTRMC0_IRQHandler ; 22: Remote control reception interrupt 0 DCD INTRMC0_IRQHandler ; 22: Remote control reception interrupt 0
DCD INTRMC1_IRQHandler ; 23: Remote control reception interrupt 1 DCD INTRMC1_IRQHandler ; 23: Remote control reception interrupt 1
DCD INTLTTMR_IRQHandler ; 24: Long Term Timer Interrupt DCD INTLTTMR0_IRQHandler ; 24: Long Term Timer Interrupt
DCD INTHDMAATC_IRQHandler ; 25: HDMA Complete of transfer(Unit A) DCD INTHDMAATC_IRQHandler ; 25: HDMA Complete of transfer(Unit A)
DCD INTHDMAAERR_IRQHandler ; 26: HDMA transfer error(Unit A) DCD INTHDMAAERR_IRQHandler ; 26: HDMA transfer error(Unit A)
DCD INTHDMABTC_IRQHandler ; 27: HDMA end of transfer(Unit B) DCD INTHDMABTC_IRQHandler ; 27: HDMA end of transfer(Unit B)
@ -267,7 +276,7 @@ Default_Handler PROC
EXPORT INTISDC_IRQHandler [WEAK] EXPORT INTISDC_IRQHandler [WEAK]
EXPORT INTRMC0_IRQHandler [WEAK] EXPORT INTRMC0_IRQHandler [WEAK]
EXPORT INTRMC1_IRQHandler [WEAK] EXPORT INTRMC1_IRQHandler [WEAK]
EXPORT INTLTTMR_IRQHandler [WEAK] EXPORT INTLTTMR0_IRQHandler [WEAK]
EXPORT INTHDMAATC_IRQHandler [WEAK] EXPORT INTHDMAATC_IRQHandler [WEAK]
EXPORT INTHDMAAERR_IRQHandler [WEAK] EXPORT INTHDMAAERR_IRQHandler [WEAK]
EXPORT INTHDMABTC_IRQHandler [WEAK] EXPORT INTHDMABTC_IRQHandler [WEAK]
@ -408,7 +417,7 @@ INTISDB_IRQHandler
INTISDC_IRQHandler INTISDC_IRQHandler
INTRMC0_IRQHandler INTRMC0_IRQHandler
INTRMC1_IRQHandler INTRMC1_IRQHandler
INTLTTMR_IRQHandler INTLTTMR0_IRQHandler
INTHDMAATC_IRQHandler INTHDMAATC_IRQHandler
INTHDMAAERR_IRQHandler INTHDMAAERR_IRQHandler
INTHDMABTC_IRQHandler INTHDMABTC_IRQHandler

View File

@ -1,4 +1,21 @@
#! armcc -E -I. --cpu Cortex-M4 #! armcc -E -I. --cpu Cortex-M4
/*
* Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
;; TMPM4G9F15FG scatter file ;; TMPM4G9F15FG scatter file
;; Vector table starts at 0 ;; Vector table starts at 0
@ -11,7 +28,6 @@
;; Data starts at 0x20000000 ;; Data starts at 0x20000000
;; Heap is positioned by ARM_LIB_HEAB (this is the heap managed by the ARM libraries) ;; Heap is positioned by ARM_LIB_HEAB (this is the heap managed by the ARM libraries)
;; Stack is positioned by ARM_LIB_STACK (library will use this to set SP - see above) ;; Stack is positioned by ARM_LIB_STACK (library will use this to set SP - see above)
;; Compatible with ISSM model ;; Compatible with ISSM model
#if !defined(MBED_APP_START) #if !defined(MBED_APP_START)

View File

@ -1,16 +1,26 @@
/** /**
******************************************************************************* *******************************************************************************
* @file startup_TMPM4G9.s * @file startup_TMPM4G9.S
* @brief CMSIS Cortex-M4F Core Device Startup File for the * @brief CMSIS Cortex-M4F Core Device Startup File for the
* TOSHIBA 'TMPM4G9' Device Series * TOSHIBA 'TMPM4G9' Device Series
* @version * @version
* @date * @date
*------- <<< Use Configuration Wizard in Context Menu >>> ------------------
* *
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved * SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************* *******************************************************************************
*/ */
.syntax unified .syntax unified
.arch armv7-m .arch armv7-m

View File

@ -1,3 +1,20 @@
/*
* Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Linker script for Toshiba TMPM4G9 */ /* Linker script for Toshiba TMPM4G9 */
/* Linker script to configure memory regions. */ /* Linker script to configure memory regions. */

View File

@ -1,14 +1,26 @@
;/** ;/**
; ******************************************************************************* ; *******************************************************************************
; * @file startup_TMPM4G9.s ; * @file startup_TMPM4G9.S
; * @brief CMSIS Cortex-M4 Core Device Startup File for the ; * @brief CMSIS Cortex-M4 Core Device Startup File for the
; * TOSHIBA 'TMPM4G9' Device Series ; * TOSHIBA 'TMPM4G9' Device Series
; * @version V1.0.9.0 ; * @version V1.0.9.0
; * $Date:: 2018-04-02 #$ ; * $Date:: 2018-04-02 #$
; * ; *
; * DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT. ; * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
; * ; *
; * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved ; * SPDX-License-Identifier: Apache-2.0
; *
; * Licensed under the Apache License, Version 2.0 (the "License");
; * you may not use this file except in compliance with the License.
; * You may obtain a copy of the License at
; *
; * http://www.apache.org/licenses/LICENSE-2.0
; *
; * Unless required by applicable law or agreed to in writing, software
; * distributed under the License is distributed on an "AS IS" BASIS,
; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; * See the License for the specific language governing permissions and
; * limitations under the License.
; ******************************************************************************* ; *******************************************************************************
; */ ; */
; ;

View File

@ -1,3 +1,20 @@
/*
* Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*###ICF### Section handled by ICF editor, don't touch! ****/ /*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/ /*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */

View File

@ -1,7 +1,20 @@
/* mbed Microcontroller Library - CMSIS for TMPM4G9 /* mbed Microcontroller Library
* Copyright (C) 2011 ARM Limited. All rights reserved.
* *
* A generic CMSIS include header, pulling in TMPM4G9 specifics * Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
#ifndef MBED_CMSIS_H #ifndef MBED_CMSIS_H
#define MBED_CMSIS_H #define MBED_CMSIS_H

View File

@ -1,7 +1,20 @@
/* mbed Microcontroller Library - cmsis_nvic for TMPM4G9 /* mbed Microcontroller Library
* Copyright (c) 2011 ARM Limited. All rights reserved.
* *
* CMSIS-style functionality to support dynamic vectors * Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
#ifndef MBED_CMSIS_NVIC_H #ifndef MBED_CMSIS_NVIC_H

View File

@ -6,9 +6,31 @@
* @version 1.0.0.0 * @version 1.0.0.0
* $Date:: 2018-04-02 #$ * $Date:: 2018-04-02 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENCE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************* *******************************************************************************
*/ */

View File

@ -6,12 +6,33 @@
* @version V0.0.0.0 * @version V0.0.0.0
* $Date:: 2018-04-02 #$ * $Date:: 2018-04-02 #$
* *
* DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LISENCE AGREEMENT. * SPDX-License-Identifier: BSD-3-Clause
* *
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved * Copyright(C) 2019, Toshiba Electronic Device Solutions Corporation
***************************************************************************** *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/ */
#include <stdint.h> #include <stdint.h>
#ifndef __SYSTEM_TMPM4G9_H #ifndef __SYSTEM_TMPM4G9_H

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -13,10 +16,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include "flash_api.h" #include "flash_api.h"
#include "mbed_critical.h" #include "mbed_critical.h"
#include "tmpm4g9_fc.h" #include "txz_fc.h"
#define PROGRAM_WIRTE_MAX (16U) // Page program could be written 16 bytes/4 words once #define PROGRAM_WIRTE_MAX (16U) // Page program could be written 16 bytes/4 words once
#define SECTOR_SIZE (0x8000) // 32KB each sectors or block #define SECTOR_SIZE (0x8000) // 32KB each sectors or block

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -284,5 +287,6 @@ static void CG_SetSTBYReleaseINTSrc(CG_INTSrc INTSource, CG_INTActiveState Activ
*ptr = (ActiveState | NewState); *ptr = (ActiveState | NewState);
{ {
uint8_t regval = *ptr; uint8_t regval = *ptr;
(void)regval;
} }
} }

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -27,7 +30,7 @@
#include "txz_t32a.h" #include "txz_t32a.h"
#include "txz_cg.h" #include "txz_cg.h"
#include "txz_driver_def.h" #include "txz_driver_def.h"
#include "adc.h" #include "txz_adc.h"
#include "txz_i2c_api.h" #include "txz_i2c_api.h"
#include "txz_i2c.h" #include "txz_i2c.h"
#include "txz_fuart_include.h" #include "txz_fuart_include.h"

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -57,7 +60,6 @@ uint32_t hal_reset_reason_get_raw(void)
reset_reason_t hal_reset_reason_get(void) reset_reason_t hal_reset_reason_get(void)
{ {
char multi_flag = 0;
reset_reason_t ret; reset_reason_t ret;
uint8_t NoOfSetBitCountReg1 = set_bit_count(TSB_RLM->RSTFLG0); uint8_t NoOfSetBitCountReg1 = set_bit_count(TSB_RLM->RSTFLG0);
@ -100,7 +102,7 @@ static bool bit_status(uint32_t reg, uint8_t bit_no)
static uint8_t set_bit_count(uint32_t reg) static uint8_t set_bit_count(uint32_t reg)
{ {
uint8_t count = 0; uint8_t count = 0;
int8_t index = 0; uint8_t index = 0;
for (index = 0; index < (sizeof(uint32_t) * 8); index++) { for (index = 0; index < (sizeof(uint32_t) * 8); index++) {
if (reg & (1 << index)) { if (reg & (1 << index)) {

View File

@ -1,5 +1,7 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2019 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -543,6 +546,7 @@ void serial_clear(serial_t *obj)
} else { } else {
{ {
dummy = obj->FUARTx->DR; //dummy read dummy = obj->FUARTx->DR; //dummy read
(void)dummy;
} }
} }
} }

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -223,7 +226,7 @@ void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel
obj_s->p_obj.init.cnt1.trgen = TSPI_TRGEN_DISABLE; // Trigger disabled obj_s->p_obj.init.cnt1.trgen = TSPI_TRGEN_DISABLE; // Trigger disabled
obj_s->p_obj.init.cnt1.trxe = TSPI_DISABLE; // Enable Communication obj_s->p_obj.init.cnt1.trxe = TSPI_DISABLE; // Enable Communication
obj_s->p_obj.init.cnt1.tspims = TSPI_SPI_MODE; // SPI mode obj_s->p_obj.init.cnt1.tspims = TSPI_SPI_MODE; // SPI mode
obj_s->p_obj.init.cnt1.mstr = TSPI_MASTER_OPEARTION; // master mode operation obj_s->p_obj.init.cnt1.mstr = TSPI_MASTER_OPERATION; // master mode operation
obj_s->p_obj.init.cnt1.tmmd = TSPI_TWO_WAY; // Full-duplex mode (Transmit/receive) obj_s->p_obj.init.cnt1.tmmd = TSPI_TWO_WAY; // Full-duplex mode (Transmit/receive)
obj_s->p_obj.init.cnt1.cssel = TSPI_TSPIxCS0_ENABLE; // Chip select of pin CS0 is valid obj_s->p_obj.init.cnt1.cssel = TSPI_TSPIxCS0_ENABLE; // Chip select of pin CS0 is valid
obj_s->p_obj.init.cnt1.fc = TSPI_TRANS_RANGE_SINGLE; // transfer single frame at a time contineously obj_s->p_obj.init.cnt1.fc = TSPI_TRANS_RANGE_SINGLE; // transfer single frame at a time contineously
@ -561,6 +564,7 @@ uint32_t spi_irq_handler_asynch(spi_t *obj)
} else { } else {
//Receive complete - dummy read //Receive complete - dummy read
uint8_t dummy = p_obj->p_instance->DR; uint8_t dummy = p_obj->p_instance->DR;
(void)dummy;
} }
} }
if((p_obj->p_instance->SR & TSPI_TX_DONE_FLAG) == TSPI_TX_DONE) { if((p_obj->p_instance->SR & TSPI_TX_DONE_FLAG) == TSPI_TX_DONE) {

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,8 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved *
* Copyright (C) 2019, Toshiba Electronic Device Solutions Corporation
*
* SPDX-License-Identifier: Apache-2.0
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.