-
Notifications
You must be signed in to change notification settings - Fork 3k
Add platform TT_M4G9 #9224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add platform TT_M4G9 #9224
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7e265c8
Add platform TT_M4G9
003a75b
Add "SPDX-License-Identifier: Apache-2.0"
ec9fd55
Update code
217d2ce
Modify license
db5d696
Modify license about file GPIO, SPI and system
1dadab7
Add license in file cmsis_nvic.h
12e4ada
Add USER_BUTTON and SPI in file PinNames.h
3c1d938
Add ARM_LIB_STACK to resolve CI Error
1a19046
Add api about I2C and SPI ....
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
499 changes: 499 additions & 0 deletions
499
targets/TARGET_TT/TARGET_TT_M4G9/Periph_Driver/inc/adc.h
Large diffs are not rendered by default.
Oops, something went wrong.
135 changes: 135 additions & 0 deletions
135
targets/TARGET_TT/TARGET_TT_M4G9/Periph_Driver/inc/adc_ch.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
/** | ||
******************************************************************************* | ||
* @file adc_ch.h | ||
* @brief This file provides all the functions prototypes for ADC driver. \n | ||
* Channel Class. | ||
* @version V1.0.0.0 | ||
* $Date:: 2017-09-07 13:52:12 #$ | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* (C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved | ||
******************************************************************************* | ||
*/ | ||
/*------------------------------------------------------------------------------*/ | ||
/* Define to prevent recursive inclusion */ | ||
/*------------------------------------------------------------------------------*/ | ||
#ifndef __ADC_CH_H | ||
#define __ADC_CH_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/*------------------------------------------------------------------------------*/ | ||
/* Includes */ | ||
/*------------------------------------------------------------------------------*/ | ||
#include "txz_driver_def.h" | ||
|
||
/** | ||
* @addtogroup Periph_Driver Peripheral Driver | ||
* @{ | ||
*/ | ||
|
||
/** | ||
* @defgroup ADC ADC | ||
* @brief ADC Driver. | ||
* @{ | ||
*/ | ||
/*------------------------------------------------------------------------------*/ | ||
/* Macro Definition */ | ||
/*------------------------------------------------------------------------------*/ | ||
/** | ||
* @defgroup ADC_Exported_define ADC Exported Define | ||
* @{ | ||
*/ | ||
|
||
/* no define */ | ||
|
||
/** | ||
* @} | ||
*/ /* End of group ADC_Exported_define */ | ||
|
||
/*------------------------------------------------------------------------------*/ | ||
/* Enumerated Type Definition */ | ||
/*------------------------------------------------------------------------------*/ | ||
/** | ||
* @defgroup ADC_Exported_define ADC Exported Define | ||
* @{ | ||
*/ | ||
|
||
/* no define */ | ||
|
||
/** | ||
* @} | ||
*/ /* End of group ADC_Exported_define */ | ||
|
||
/*------------------------------------------------------------------------------*/ | ||
/* Structure Definition */ | ||
/*------------------------------------------------------------------------------*/ | ||
/** | ||
* @defgroup ADC_Exported_typedef ADC Exported Typedef | ||
* @{ | ||
*/ | ||
|
||
/*----------------------------------*/ | ||
/*! @struct adc_ch_initial_setting_t | ||
* @brief Initialize Setting. | ||
*/ | ||
/*----------------------------------*/ | ||
typedef struct | ||
{ | ||
uint32_t interrupt; /*!< Interrupt Enable/Disable. | ||
: Use @ref adc_dma_int_t. */ | ||
uint32_t type; /*!< Conversion Type. | ||
: Use @ref adc_conversion_t. */ | ||
uint32_t ain; /*!< AIN. */ | ||
} adc_ch_initial_setting_t; | ||
|
||
/*----------------------------------*/ | ||
/*! @struct adc_ch_t | ||
* @brief ADC handle structure definenition. | ||
*/ | ||
/*----------------------------------*/ | ||
typedef struct | ||
{ | ||
__IO uint32_t *p_tset; /*!< ADxTSETn Address. */ | ||
__I uint32_t *p_reg; /*!< ADxREGx Address. */ | ||
adc_ch_initial_setting_t init; /*!< Initial setting. */ | ||
} adc_ch_t; | ||
|
||
/** | ||
* @} | ||
*/ /* End of group ADC_Exported_typedef */ | ||
|
||
/*------------------------------------------------------------------------------*/ | ||
/* Functions */ | ||
/*------------------------------------------------------------------------------*/ | ||
/** | ||
* @defgroup ADC_Exported_functions ADC Exported Functions | ||
* @{ | ||
*/ | ||
uint32_t get_conversion_data(uint32_t reg); | ||
TXZ_Result adc_ch_init(adc_ch_t *p_obj); | ||
TXZ_Result adc_ch_deinit(adc_ch_t *p_obj); | ||
TXZ_Result adc_ch_int_enable(adc_ch_t *p_obj); | ||
TXZ_Result adc_ch_int_disable(adc_ch_t *p_obj); | ||
TXZ_Result adc_ch_get_value(adc_ch_t *p_obj, uint32_t *p_value); | ||
/** | ||
* @} | ||
*/ /* End of group ADC_Exported_functions */ | ||
|
||
/** | ||
* @} | ||
*/ /* End of group ADC */ | ||
|
||
/** | ||
* @} | ||
*/ /* End of group Periph_Driver */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif /* __cplusplus */ | ||
#endif /* __ADC_CH_H */ | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.