update 1.8
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
<configuration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.1008047074" name="obj">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="791223697081682549" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
</project>
|
||||
+17
-18
@@ -4,24 +4,24 @@
|
||||
* Version : V1.0.0
|
||||
* Date : 2021/06/06
|
||||
* Description : Main program body.
|
||||
*********************************************************************************
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
* Attention: This software (modified or not) and binary are used for
|
||||
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
|
||||
*******************************************************************************/
|
||||
*********************************************************************************
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
* Attention: This software (modified or not) and binary are used for
|
||||
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
|
||||
*******************************************************************************/
|
||||
|
||||
/*
|
||||
*@Note
|
||||
OPA1 is used as a voltage follower output, the external voltage is output to OPA1,
|
||||
and the ADC samples OPA1
|
||||
OPA1_CHP1 -- PB0
|
||||
OPA1_CHN1 -- PA6
|
||||
OPA1_OUT_IO_OUT0 -- PA3
|
||||
|
||||
In this example, PA6 and PA3 are short-circuited, and the external voltage is input
|
||||
from PB0. If the negative feedback is connected to a resistor, it can also form
|
||||
an operational amplifier.
|
||||
*/
|
||||
*OPA1 is used as a voltage follower output, the external voltage is output to OPA1,
|
||||
*and the ADC samples OPA1
|
||||
*OPA1_CHP1 -- PB0
|
||||
*OPA1_CHN1 -- PA6
|
||||
*OPA1_OUT_IO_OUT0 -- PA3
|
||||
*
|
||||
* In this example, PA6 and PA3 are short-circuited, and the external voltage is input
|
||||
* from PB0. If the negative feedback is connected to a resistor, it can also form
|
||||
* an operational amplifier.
|
||||
*/
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
/* Global Variable */
|
||||
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* @fn OPA1_Init
|
||||
*
|
||||
@@ -189,10 +187,11 @@ u16 Get_ADC_Average( u8 ch, u8 times )
|
||||
int main( void )
|
||||
{
|
||||
u16 ADC_val, i;
|
||||
|
||||
SystemCoreClockUpdate();
|
||||
Delay_Init();
|
||||
USART_Printf_Init( 115200 );
|
||||
printf( "SystemClk:%d\r\n", SystemCoreClock );
|
||||
printf( "ChipID:%08x\r\n", DBGMCU_GetCHIPID() );
|
||||
printf( "OPA Test\r\n" );
|
||||
OPA1_Init();
|
||||
ADC_Channel3_Init();
|
||||
|
||||
Reference in New Issue
Block a user