Merge remote-tracking branch 'offical/master' into at32_patch
This commit is contained in:
commit
c08eff17cb
@ -11,14 +11,20 @@
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
#include "drv_gpio.h"
|
||||
#include <drv_gpio.h>
|
||||
#include <fsl_gpio.h>
|
||||
|
||||
#define EXAMPLE_LED_GPIO GPIO9
|
||||
#define EXAMPLE_LED_GPIO_PIN (3U)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
rt_kprintf("test\r\n");
|
||||
rt_thread_mdelay(500);
|
||||
GPIO_PinWrite(EXAMPLE_LED_GPIO, EXAMPLE_LED_GPIO_PIN, 0U);
|
||||
rt_thread_mdelay(500);
|
||||
GPIO_PinWrite(EXAMPLE_LED_GPIO, EXAMPLE_LED_GPIO_PIN, 1U);
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ processor_version: 0.9.6
|
||||
|
||||
#include "fsl_common.h"
|
||||
#include "fsl_iomuxc.h"
|
||||
#include "fsl_gpio.h"
|
||||
#include "pin_mux.h"
|
||||
|
||||
/* FUNCTION ************************************************************************************************************
|
||||
@ -57,7 +58,32 @@ BOARD_InitPins:
|
||||
* END ****************************************************************************************************************/
|
||||
void BOARD_InitPins(void) {
|
||||
CLOCK_EnableClock(kCLOCK_Iomuxc); /* LPCG on: LPCG is ON. */
|
||||
CLOCK_EnableClock(kCLOCK_Iomuxc_Lpsr); /* LPCG on: LPCG is ON. */
|
||||
|
||||
/* GPIO configuration on GPIO_AD_04 (pin M13) */
|
||||
gpio_pin_config_t gpio9_pinM13_config = {
|
||||
.direction = kGPIO_DigitalOutput,
|
||||
.outputLogic = 0U,
|
||||
.interruptMode = kGPIO_NoIntmode
|
||||
};
|
||||
/* Initialize GPIO functionality on GPIO_AD_04 (pin M13) */
|
||||
GPIO_PinInit(GPIO9, 3U, &gpio9_pinM13_config);
|
||||
|
||||
/* GPIO configuration on GPIO_AD_26 (pin L14) */
|
||||
gpio_pin_config_t gpio9_pinL14_config = {
|
||||
.direction = kGPIO_DigitalOutput,
|
||||
.outputLogic = 0U,
|
||||
.interruptMode = kGPIO_NoIntmode
|
||||
};
|
||||
/* Initialize GPIO functionality on GPIO_AD_04 (pin L14) */
|
||||
GPIO_PinInit(GPIO9, 25U, &gpio9_pinL14_config);
|
||||
|
||||
IOMUXC_SetPinMux(
|
||||
IOMUXC_GPIO_AD_04_GPIO9_IO03, /* GPIO_AD_04 is configured as GPIO9_IO03 */
|
||||
0U);
|
||||
IOMUXC_SetPinMux(
|
||||
IOMUXC_GPIO_AD_26_GPIO9_IO25, /* GPIO_AD_04 is configured as GPIO9_IO03 */
|
||||
0U);
|
||||
IOMUXC_SetPinMux(
|
||||
IOMUXC_GPIO_AD_24_LPUART1_TXD, /* GPIO_AD_24 is configured as LPUART1_TXD */
|
||||
0U); /* Software Input On Field: Input Path is determined by functionality */
|
||||
|
@ -1,13 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
|
||||
|
||||
<SchemaVersion>2.1</SchemaVersion>
|
||||
|
||||
<Header>### uVision Project, (C) Keil Software</Header>
|
||||
|
||||
<Targets>
|
||||
<Target>
|
||||
<TargetName>rtthread</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>6150000::V6.15::ARMCLANG</pCCUsed>
|
||||
<pCCUsed>6140001::V6.14.1::ARMCLANG</pCCUsed>
|
||||
<uAC6>1</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@ -16,28 +19,28 @@
|
||||
<PackID>NXP.MIMXRT1176_DFP.13.1.0</PackID>
|
||||
<PackURL>https://mcuxpresso.nxp.com/cmsis_pack/repo/</PackURL>
|
||||
<Cpu>IRAM(0x20000000,0x020000) IRAM2(0x20000000,0x040000) IROM(0x00200000,0x040000) XRAM(0x1ffe0000,0x020000) XRAM2(0x00000000,0x040000) XRAM3(0x20240000,0x080000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec />
|
||||
<StartupFile />
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC40000 -FN2 -FF0MIMXRT117x_QuadSPI_4KB_SEC -FS030000000 -FL01000000 -FF1MIMXRT117x_QuadSPI_4KB_SEC_Alias -FS18000000 -FL11000000 -FP0($$Device:MIMXRT1176DVMAA$arm\MIMXRT117x_QuadSPI_4KB_SEC.FLM) -FP1($$Device:MIMXRT1176DVMAA$arm\MIMXRT117x_QuadSPI_4KB_SEC_Alias.FLM))</FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:MIMXRT1176DVMAA$fsl_device_registers.h</RegisterFile>
|
||||
<MemoryEnv />
|
||||
<Cmp />
|
||||
<Asm />
|
||||
<Linker />
|
||||
<OHString />
|
||||
<InfinionOptionDll />
|
||||
<SLE66CMisc />
|
||||
<SLE66AMisc />
|
||||
<SLE66LinkerMisc />
|
||||
<MemoryEnv></MemoryEnv>
|
||||
<Cmp></Cmp>
|
||||
<Asm></Asm>
|
||||
<Linker></Linker>
|
||||
<OHString></OHString>
|
||||
<InfinionOptionDll></InfinionOptionDll>
|
||||
<SLE66CMisc></SLE66CMisc>
|
||||
<SLE66AMisc></SLE66AMisc>
|
||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||
<SFDFile>$$Device:MIMXRT1176DVMAA$MIMXRT1176_cm7.xml</SFDFile>
|
||||
<bCustSvd>0</bCustSvd>
|
||||
<UseEnv>0</UseEnv>
|
||||
<BinPath />
|
||||
<IncludePath />
|
||||
<LibPath />
|
||||
<RegisterFilePath />
|
||||
<DBRegisterFilePath />
|
||||
<BinPath></BinPath>
|
||||
<IncludePath></IncludePath>
|
||||
<LibPath></LibPath>
|
||||
<RegisterFilePath></RegisterFilePath>
|
||||
<DBRegisterFilePath></DBRegisterFilePath>
|
||||
<TargetStatus>
|
||||
<Error>0</Error>
|
||||
<ExitCodeStop>0</ExitCodeStop>
|
||||
@ -59,8 +62,8 @@
|
||||
<BeforeCompile>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name />
|
||||
<UserProg2Name />
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopU1X>0</nStopU1X>
|
||||
@ -69,8 +72,8 @@
|
||||
<BeforeMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name />
|
||||
<UserProg2Name />
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopB1X>0</nStopB1X>
|
||||
@ -80,14 +83,14 @@
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name>fromelf --bin !L --output rtthread.bin</UserProg1Name>
|
||||
<UserProg2Name />
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopA1X>0</nStopA1X>
|
||||
<nStopA2X>0</nStopA2X>
|
||||
</AfterMake>
|
||||
<SelectedForBatchBuild>0</SelectedForBatchBuild>
|
||||
<SVCSIdString />
|
||||
<SVCSIdString></SVCSIdString>
|
||||
</TargetCommonOption>
|
||||
<CommonProperty>
|
||||
<UseCPPCompiler>0</UseCPPCompiler>
|
||||
@ -101,8 +104,8 @@
|
||||
<AssembleAssemblyFile>0</AssembleAssemblyFile>
|
||||
<PublicsOnly>0</PublicsOnly>
|
||||
<StopOnExitCode>3</StopOnExitCode>
|
||||
<CustomArgument />
|
||||
<IncludeLibraryModules />
|
||||
<CustomArgument></CustomArgument>
|
||||
<IncludeLibraryModules></IncludeLibraryModules>
|
||||
<ComprImg>1</ComprImg>
|
||||
</CommonProperty>
|
||||
<DllOption>
|
||||
@ -136,10 +139,10 @@
|
||||
<bUseTDR>1</bUseTDR>
|
||||
<Flash2>BIN\UL2CM3.DLL</Flash2>
|
||||
<Flash3>"" ()</Flash3>
|
||||
<Flash4 />
|
||||
<pFcarmOut />
|
||||
<pFcarmGrp />
|
||||
<pFcArmRoot />
|
||||
<Flash4></Flash4>
|
||||
<pFcarmOut></pFcarmOut>
|
||||
<pFcarmGrp></pFcarmGrp>
|
||||
<pFcArmRoot></pFcArmRoot>
|
||||
<FcArmLst>0</FcArmLst>
|
||||
</Utilities>
|
||||
<TargetArmAds>
|
||||
@ -172,7 +175,7 @@
|
||||
<RvctClst>0</RvctClst>
|
||||
<GenPPlst>0</GenPPlst>
|
||||
<AdsCpuType>"Cortex-M7"</AdsCpuType>
|
||||
<RvctDeviceName />
|
||||
<RvctDeviceName></RvctDeviceName>
|
||||
<mOS>0</mOS>
|
||||
<uocRom>0</uocRom>
|
||||
<uocRam>0</uocRam>
|
||||
@ -306,11 +309,11 @@
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT10>
|
||||
</OnChipMemories>
|
||||
<RvctStartVector />
|
||||
<RvctStartVector></RvctStartVector>
|
||||
</ArmAdsMisc>
|
||||
<Cads>
|
||||
<interw>1</interw>
|
||||
<Optim>5</Optim>
|
||||
<Optim>2</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>1</OneElfS>
|
||||
@ -335,8 +338,8 @@
|
||||
<VariousControls>
|
||||
<MiscControls>-xc -std=gnu99 -mimplicit-float </MiscControls>
|
||||
<Define>CPU_MIMXRT1176DVMAA_cm7, USE_SDRAM, __STDC_LIMIT_MACROS, __RTTHREAD__, XIP_BOOT_HEADER_DCD_ENABLE=1, ARM_MATH_CM7, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, SOC_IMXRT1170_SERIES, XIP_BOOT_HEADER_ENABLE=1, FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1, XIP_EXTERNAL_FLASH=1, RT_USING_ARM_LIBC</Define>
|
||||
<Undefine />
|
||||
<IncludePath>applications;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\extension;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m7;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;board;board\MCUX_Config;board\ports;..\libraries\drivers;..\..\..\components\finsh;.;..\..\..\include;..\libraries\MIMXRT1170\CMSIS\Include;..\libraries\MIMXRT1170\MIMXRT1176;..\libraries\MIMXRT1170\MIMXRT1176\drivers;..\libraries\peripherals;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\io\stdio;..\..\..\components\libc\posix\ipc;..\..\..\components\net\netdev\include;xip</IncludePath>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath>applications;..\..\..\components\libc\compilers\common\include;..\..\..\components\libc\compilers\common\extension;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m7;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;board;board\MCUX_Config;board\ports;..\libraries\drivers;..\..\..\components\finsh;.;..\..\..\include;..\libraries\MIMXRT1170\CMSIS\Include;..\libraries\MIMXRT1170\MIMXRT1176;..\libraries\MIMXRT1170\MIMXRT1176\drivers;..\libraries\peripherals;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\io\stdio;..\..\..\components\libc\posix\ipc;..\..\..\components\net\netdev\include;xip</IncludePath>
|
||||
</VariousControls>
|
||||
</Cads>
|
||||
<Aads>
|
||||
@ -351,10 +354,10 @@
|
||||
<useXO>0</useXO>
|
||||
<ClangAsOpt>1</ClangAsOpt>
|
||||
<VariousControls>
|
||||
<MiscControls />
|
||||
<Define />
|
||||
<Undefine />
|
||||
<IncludePath />
|
||||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath></IncludePath>
|
||||
</VariousControls>
|
||||
</Aads>
|
||||
<LDads>
|
||||
@ -366,12 +369,12 @@
|
||||
<useFile>0</useFile>
|
||||
<TextAddressRange>0x00000000</TextAddressRange>
|
||||
<DataAddressRange>0x10000000</DataAddressRange>
|
||||
<pXoBase />
|
||||
<pXoBase></pXoBase>
|
||||
<ScatterFile>.\board\linker_scripts\link.sct</ScatterFile>
|
||||
<IncludeLibs />
|
||||
<IncludeLibsPath />
|
||||
<Misc>--keep=*(.boot_hdr.ivt)--keep=*(.boot_hdr.boot_data)--keep=*(.boot_hdr.dcd_data)--keep=*(.boot_hdr.conf)</Misc>
|
||||
<LinkerInputFile />
|
||||
<IncludeLibs></IncludeLibs>
|
||||
<IncludeLibsPath></IncludeLibsPath>
|
||||
<Misc>--keep=*(.boot_hdr.ivt) --keep=*(.boot_hdr.boot_data) --keep=*(.boot_hdr.dcd_data) --keep=*(.boot_hdr.conf) --predefine="-DXIP_BOOT_HEADER_ENABLE=1"</Misc>
|
||||
<LinkerInputFile></LinkerInputFile>
|
||||
<DisabledWarnings>6439,6314</DisabledWarnings>
|
||||
</LDads>
|
||||
</TargetArmAds>
|
||||
@ -385,8 +388,6 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\mnt.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>main.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@ -402,26 +403,40 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\libc\compilers\armlibc\syscall_mem.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>syscalls.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\libc\compilers\armlibc\syscalls.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>stdlib.c</FileName>
|
||||
<FileName>cctype.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\libc\compilers\common\stdlib.c</FilePath>
|
||||
<FilePath>..\..\..\components\libc\compilers\common\cctype.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>time.c</FileName>
|
||||
<FileName>cstdio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\libc\compilers\common\time.c</FilePath>
|
||||
<FilePath>..\..\..\components\libc\compilers\common\cstdio.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>cstdlib.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\libc\compilers\common\cstdlib.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>cstring.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\libc\compilers\common\cstring.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>ctime.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\libc\compilers\common\ctime.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>cwchar.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\libc\compilers\common\cwchar.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
@ -433,36 +448,26 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\libcpu\arm\common\backtrace.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>div0.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\libcpu\arm\common\div0.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>showmem.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\libcpu\arm\common\showmem.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>context_rvds.S</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>..\..\..\libcpu\arm\cortex-m7\context_rvds.S</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>cpu_cache.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\libcpu\arm\cortex-m7\cpu_cache.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>cpuport.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@ -478,71 +483,51 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\cputime\cputime.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>completion.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\ipc\completion.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>dataqueue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\ipc\dataqueue.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>pipe.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\ipc\pipe.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>ringblk_buf.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\ipc\ringblk_buf.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>ringbuffer.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\ipc\ringbuffer.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>waitqueue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\ipc\waitqueue.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>workqueue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\ipc\workqueue.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>pin.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\misc\pin.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>phy.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\drivers\phy\phy.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>serial.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@ -558,36 +543,26 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>board\MCUX_Config\clock_config.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>pin_mux.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>board\MCUX_Config\pin_mux.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>board.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>board\board.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>dcd.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>board\dcd.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>drv_gpio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\drivers\drv_gpio.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>drv_uart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@ -603,22 +578,16 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\finsh\shell.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>msh.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\finsh\msh.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>msh_parse.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\finsh\msh_parse.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>cmd.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@ -634,85 +603,61 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\clock.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>components.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\components.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>device.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\device.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>idle.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\idle.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>ipc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\ipc.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>irq.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\irq.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>kservice.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\kservice.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>memheap.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\memheap.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>mempool.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\mempool.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>object.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\object.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>scheduler.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\scheduler.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>thread.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\thread.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>timer.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@ -728,71 +673,51 @@
|
||||
<FileType>2</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\arm\startup_MIMXRT1176_cm7.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_cache.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\drivers\cm7\fsl_cache.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_anatop_ai.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\drivers\fsl_anatop_ai.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_clock.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\drivers\fsl_clock.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_common.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\drivers\fsl_common.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_common_arm.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\drivers\fsl_common_arm.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_dcdc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\drivers\fsl_dcdc.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_gpio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\drivers\fsl_gpio.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_lpuart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\drivers\fsl_lpuart.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_pmu.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\libraries\MIMXRT1170\MIMXRT1176\drivers\fsl_pmu.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>system_MIMXRT1176_cm7.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@ -802,46 +727,44 @@
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>SAL</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>netdev.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\net\netdev\src\netdev.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>netdev_ipaddr.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\net\netdev\src\netdev_ipaddr.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>netdev.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\net\netdev\src\netdev.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>xip</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>fsl_flexspi_nor_boot.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>xip\fsl_flexspi_nor_boot.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>evkmimxrt1170_flexspi_nor_config.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>xip\evkmimxrt1170_flexspi_nor_config.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>fsl_flexspi_nor_boot.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>xip\fsl_flexspi_nor_boot.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
</Groups>
|
||||
</Target>
|
||||
</Targets>
|
||||
|
||||
<RTE>
|
||||
<apis />
|
||||
<components />
|
||||
<files />
|
||||
<apis/>
|
||||
<components/>
|
||||
<files/>
|
||||
</RTE>
|
||||
|
||||
<LayerInfo>
|
||||
<Layers>
|
||||
<Layer>
|
||||
@ -851,4 +774,5 @@
|
||||
</Layer>
|
||||
</Layers>
|
||||
</LayerInfo>
|
||||
|
||||
</Project>
|
||||
|
@ -8,10 +8,11 @@ if GetDepend('BSP_USING_QSPIFLASH'):
|
||||
CPPPATH = [cwd]
|
||||
|
||||
if rtconfig.CROSS_TOOL == 'keil':
|
||||
LINKFLAGS = '--keep=*(.boot_hdr.ivt)'
|
||||
LINKFLAGS += '--keep=*(.boot_hdr.boot_data)'
|
||||
LINKFLAGS += '--keep=*(.boot_hdr.dcd_data)'
|
||||
LINKFLAGS += '--keep=*(.boot_hdr.conf)'
|
||||
LINKFLAGS = ' --keep=*(.boot_hdr.ivt)'
|
||||
LINKFLAGS += ' --keep=*(.boot_hdr.boot_data)'
|
||||
LINKFLAGS += ' --keep=*(.boot_hdr.dcd_data)'
|
||||
LINKFLAGS += ' --keep=*(.boot_hdr.conf)'
|
||||
LINKFLAGS += ' --predefine="-DXIP_BOOT_HEADER_ENABLE=1"'
|
||||
else:
|
||||
LINKFLAGS = ''
|
||||
|
||||
|
@ -578,7 +578,7 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
|
||||
# CONFIG_PKG_USING_ADT74XX is not set
|
||||
# CONFIG_PKG_USING_AS7341 is not set
|
||||
# CONFIG_PKG_USING_STM32_SDIO is not set
|
||||
# CONFIG_PKG_USING_RTT_ESP_IDF is not set
|
||||
# CONFIG_PKG_USING_ESP_IDF is not set
|
||||
# CONFIG_PKG_USING_ICM20608 is not set
|
||||
# CONFIG_PKG_USING_BUTTON is not set
|
||||
# CONFIG_PKG_USING_PCF8574 is not set
|
||||
@ -592,7 +592,7 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
|
||||
# CONFIG_PKG_USING_WM_LIBRARIES is not set
|
||||
|
||||
#
|
||||
# kendryte-sdk: Kendryte SDK
|
||||
# Kendryte SDK
|
||||
#
|
||||
CONFIG_PKG_USING_K210_SDK=y
|
||||
CONFIG_PKG_K210_SDK_PATH="/packages/peripherals/kendryte-sdk/K210-SDK"
|
||||
@ -660,6 +660,7 @@ CONFIG_PKG_K210_SDK_VER="latest"
|
||||
# CONFIG_PKG_USING_CW2015 is not set
|
||||
# CONFIG_PKG_USING_RFM300 is not set
|
||||
# CONFIG_PKG_USING_IO_INPUT_FILTER is not set
|
||||
# CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set
|
||||
|
||||
#
|
||||
# AI packages
|
||||
@ -735,6 +736,7 @@ CONFIG_PKG_K210_SDK_VER="latest"
|
||||
# CONFIG_PKG_USING_MFBD is not set
|
||||
# CONFIG_PKG_USING_SLCAN2RTT is not set
|
||||
# CONFIG_PKG_USING_SOEM is not set
|
||||
CONFIG_SOC_K210=y
|
||||
CONFIG_BOARD_K210_EVB=y
|
||||
|
||||
#
|
||||
|
@ -17,17 +17,7 @@ config PKGS_DIR
|
||||
|
||||
source "$RTT_DIR/Kconfig"
|
||||
source "$PKGS_DIR/Kconfig"
|
||||
|
||||
config BOARD_K210_EVB
|
||||
bool
|
||||
select ARCH_RISCV64
|
||||
select ARCH_RISCV_FPU_S
|
||||
select RT_USING_COMPONENTS_INIT
|
||||
select RT_USING_USER_MAIN
|
||||
select PKG_USING_K210_SDK
|
||||
default y
|
||||
|
||||
source "driver/Kconfig"
|
||||
source "drivers/Kconfig"
|
||||
|
||||
config __STACKSIZE__
|
||||
int "stack size for interrupt"
|
||||
|
@ -1,3 +1,16 @@
|
||||
config SOC_K210
|
||||
bool
|
||||
select ARCH_RISCV64
|
||||
select ARCH_RISCV_FPU_S
|
||||
select PKG_USING_K210_SDK
|
||||
|
||||
config BOARD_K210_EVB
|
||||
bool
|
||||
select SOC_K210
|
||||
select RT_USING_COMPONENTS_INIT
|
||||
select RT_USING_USER_MAIN
|
||||
default y
|
||||
|
||||
menu "Hardware Drivers Config"
|
||||
|
||||
config BSP_USING_UART_HS
|
||||
@ -58,17 +71,17 @@ if BSP_USING_SPI1
|
||||
default n
|
||||
config BSP_SPI1_CLK_PIN
|
||||
int "spi1 clk pin number"
|
||||
default 29
|
||||
default 29
|
||||
config BSP_SPI1_D0_PIN
|
||||
int "spi1 d0 pin number"
|
||||
default 30
|
||||
default 30
|
||||
config BSP_SPI1_D1_PIN
|
||||
int "spi1 d1 pin number"
|
||||
default 31
|
||||
default 31
|
||||
if BSP_USING_SPI1_AS_QSPI
|
||||
config BSP_SPI1_D2_PIN
|
||||
int "spi1 d2 pin number"
|
||||
default 32
|
||||
default 32
|
||||
config BSP_SPI1_D3_PIN
|
||||
int "spi1 d3 pin number"
|
||||
default 33
|
||||
@ -199,4 +212,3 @@ if BSP_USING_CAMERA
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
@ -216,7 +216,7 @@
|
||||
/* peripheral libraries and drivers */
|
||||
|
||||
|
||||
/* kendryte-sdk: Kendryte SDK */
|
||||
/* Kendryte SDK */
|
||||
|
||||
#define PKG_USING_K210_SDK
|
||||
#define PKG_USING_K210_SDK_LATEST_VERSION
|
||||
@ -233,6 +233,7 @@
|
||||
|
||||
/* entertainment: terminal games and other interesting software packages */
|
||||
|
||||
#define SOC_K210
|
||||
#define BOARD_K210_EVB
|
||||
|
||||
/* Hardware Drivers Config */
|
||||
|
@ -524,6 +524,7 @@ void rt_hw_sdl_start(void)
|
||||
pthread_mutex_lock(&sdl_ok_mutex);
|
||||
pthread_cond_wait(&sdl_ok_event, &sdl_ok_mutex);
|
||||
|
||||
pthread_mutex_unlock(&sdl_ok_mutex);
|
||||
pthread_mutex_destroy(&sdl_ok_mutex);
|
||||
pthread_cond_destroy(&sdl_ok_event);
|
||||
#endif
|
||||
|
@ -30,6 +30,11 @@
|
||||
|
||||
#define MAX_ADDR_LEN 6
|
||||
|
||||
#undef PHY_FULL_DUPLEX
|
||||
#define PHY_LINK (1 << 0)
|
||||
#define PHY_100M (1 << 1)
|
||||
#define PHY_FULL_DUPLEX (1 << 2)
|
||||
|
||||
struct rt_stm32_eth
|
||||
{
|
||||
/* inherit from ethernet device */
|
||||
@ -401,12 +406,6 @@ void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth)
|
||||
LOG_E("eth err");
|
||||
}
|
||||
|
||||
enum {
|
||||
PHY_LINK = (1 << 0),
|
||||
PHY_100M = (1 << 1),
|
||||
PHY_FULL_DUPLEX = (1 << 2),
|
||||
};
|
||||
|
||||
static void phy_linkchange()
|
||||
{
|
||||
static rt_uint8_t phy_speed = 0;
|
||||
|
@ -22,6 +22,15 @@
|
||||
#define LOG_TAG "drv.emac"
|
||||
#include <drv_log.h>
|
||||
|
||||
#undef PHY_FULL_DUPLEX
|
||||
#undef PHY_HALF_DUPLEX
|
||||
#define PHY_LINK (1 << 0)
|
||||
#define PHY_10M (1 << 1)
|
||||
#define PHY_100M (1 << 2)
|
||||
#define PHY_1000M (1 << 3)
|
||||
#define PHY_FULL_DUPLEX (1 << 4)
|
||||
#define PHY_HALF_DUPLEX (1 << 5)
|
||||
|
||||
#define MAX_ADDR_LEN 6
|
||||
rt_base_t level;
|
||||
|
||||
|
@ -50,16 +50,6 @@ typedef struct
|
||||
uint32_t rdes3;
|
||||
} RxDmaDesc;
|
||||
|
||||
enum {
|
||||
PHY_LINK = (1 << 0),
|
||||
PHY_10M = (1 << 1),
|
||||
PHY_100M = (1 << 2),
|
||||
PHY_1000M = (1 << 3),
|
||||
PHY_FULL_DUPLEX = (1 << 4),
|
||||
PHY_HALF_DUPLEX = (1 << 5)
|
||||
};
|
||||
|
||||
|
||||
#define RTL8211F_PHY_ADDR 1 /* PHY address */
|
||||
|
||||
#define ETH_TXBUFNB 4 /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
|
||||
|
@ -30,6 +30,15 @@ rt_base_t level;
|
||||
#define TX_DMA_ADD_BASE 0x2FFC7000
|
||||
#define RX_DMA_ADD_BASE 0x2FFC7100
|
||||
|
||||
#undef PHY_FULL_DUPLEX
|
||||
#undef PHY_HALF_DUPLEX
|
||||
#define PHY_LINK (1 << 0)
|
||||
#define PHY_10M (1 << 1)
|
||||
#define PHY_100M (1 << 2)
|
||||
#define PHY_1000M (1 << 3)
|
||||
#define PHY_FULL_DUPLEX (1 << 4)
|
||||
#define PHY_HALF_DUPLEX (1 << 5)
|
||||
|
||||
#if defined(__ICCARM__)
|
||||
/* transmit buffer */
|
||||
#pragma location = TX_ADD_BASE
|
||||
|
@ -42,15 +42,6 @@ typedef struct
|
||||
uint32_t rdes3;
|
||||
} RxDmaDesc;
|
||||
|
||||
enum {
|
||||
PHY_LINK = (1 << 0),
|
||||
PHY_10M = (1 << 1),
|
||||
PHY_100M = (1 << 2),
|
||||
PHY_1000M = (1 << 3),
|
||||
PHY_FULL_DUPLEX = (1 << 4),
|
||||
PHY_HALF_DUPLEX = (1 << 5)
|
||||
};
|
||||
|
||||
#define RTL8211E_PHY_ADDR 7 /* PHY address */
|
||||
|
||||
#define ETH_TXBUFNB 4 /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
|
||||
|
@ -19,52 +19,34 @@ extern "C"
|
||||
#endif
|
||||
|
||||
/* Defines the PHY link speed. This is align with the speed for MAC. */
|
||||
enum phy_speed
|
||||
{
|
||||
PHY_SPEED_10M = 0U, /* PHY 10M speed. */
|
||||
PHY_SPEED_100M /* PHY 100M speed. */
|
||||
};
|
||||
#define PHY_SPEED_10M 0U /* PHY 10M speed. */
|
||||
#define PHY_SPEED_100M 1U /* PHY 100M speed. */
|
||||
|
||||
/* Defines the PHY link duplex. */
|
||||
enum phy_duplex
|
||||
{
|
||||
PHY_HALF_DUPLEX = 0U, /* PHY half duplex. */
|
||||
PHY_FULL_DUPLEX /* PHY full duplex. */
|
||||
};
|
||||
#define PHY_HALF_DUPLEX 0U /* PHY half duplex. */
|
||||
#define PHY_FULL_DUPLEX 1U /* PHY full duplex. */
|
||||
|
||||
/*! @brief Defines the PHY loopback mode. */
|
||||
enum phy_loop
|
||||
{
|
||||
PHY_LOCAL_LOOP = 0U, /* PHY local loopback. */
|
||||
PHY_REMOTE_LOOP /* PHY remote loopback. */
|
||||
};
|
||||
#define PHY_LOCAL_LOOP 0U /* PHY local loopback. */
|
||||
#define PHY_REMOTE_LOOP 1U /* PHY remote loopback. */
|
||||
|
||||
#define PHY_STATUS_OK 0U
|
||||
#define PHY_STATUS_FAIL 1U
|
||||
#define PHY_STATUS_TIMEOUT 2U
|
||||
|
||||
struct rt_phy_msg
|
||||
typedef struct rt_phy_msg
|
||||
{
|
||||
rt_uint32_t reg;
|
||||
rt_uint32_t value;
|
||||
};
|
||||
}rt_phy_msg_t;
|
||||
|
||||
typedef struct rt_phy_msg rt_phy_msg_t;
|
||||
|
||||
|
||||
struct rt_phy_device
|
||||
typedef struct rt_phy_device
|
||||
{
|
||||
struct rt_device parent;
|
||||
struct rt_mdio_bus *bus;
|
||||
rt_uint32_t addr;
|
||||
struct rt_phy_ops *ops;
|
||||
};
|
||||
|
||||
typedef struct rt_phy_device rt_phy_t;
|
||||
|
||||
|
||||
enum {
|
||||
PHY_STATUS_OK = 0,
|
||||
PHY_STATUS_FAIL,
|
||||
PHY_STATUS_TIMEOUT,
|
||||
};
|
||||
}rt_phy_t;
|
||||
|
||||
typedef rt_int32_t rt_phy_status;
|
||||
|
||||
|
@ -31,8 +31,6 @@ static rt_size_t phy_device_write(rt_device_t dev, rt_off_t pos, const void *buf
|
||||
return phy->bus->ops->write(phy->bus, phy->addr, msg->reg, &(msg->value), 4);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef RT_USING_DEVICE_OPS
|
||||
const static struct rt_device_ops phy_ops =
|
||||
{
|
||||
|
@ -1389,7 +1389,7 @@ static rt_size_t rt_serial_write(struct rt_device *dev,
|
||||
return _serial_poll_tx(dev, pos, buffer, size);
|
||||
}
|
||||
|
||||
if (dev->open_flag | RT_SERIAL_TX_BLOCKING)
|
||||
if (dev->open_flag & RT_SERIAL_TX_BLOCKING)
|
||||
{
|
||||
if ((tx_fifo->rb.buffer_ptr) == RT_NULL)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd
|
||||
* COPYRIGHT (C) 2011-2022, Real-Thread Information Technology Ltd
|
||||
* All rights reserved
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
@ -8,6 +8,7 @@
|
||||
* Date Author Notes
|
||||
* 2013-04-14 Grissiom initial implementation
|
||||
* 2019-12-09 Steven Liu add YMODEM send protocol
|
||||
* 2022-08-04 Meco Man move error codes to rym_code to silence warnings
|
||||
*/
|
||||
|
||||
#ifndef __YMODEM_H__
|
||||
@ -17,7 +18,6 @@
|
||||
#include <string.h>
|
||||
|
||||
/* The word "RYM" is stand for "Real-YModem". */
|
||||
|
||||
enum rym_code
|
||||
{
|
||||
RYM_CODE_NONE = 0x00,
|
||||
@ -28,29 +28,17 @@ enum rym_code
|
||||
RYM_CODE_NAK = 0x15,
|
||||
RYM_CODE_CAN = 0x18,
|
||||
RYM_CODE_C = 0x43,
|
||||
};
|
||||
|
||||
/* RYM error code
|
||||
*
|
||||
* We use the rt_err_t to return error values. We take use of current error
|
||||
* codes available in RTT and append ourselves.
|
||||
*/
|
||||
/* timeout on handshake */
|
||||
#define RYM_ERR_TMO 0x70
|
||||
/* wrong code, wrong SOH, STX etc. */
|
||||
#define RYM_ERR_CODE 0x71
|
||||
/* wrong sequence number */
|
||||
#define RYM_ERR_SEQ 0x72
|
||||
/* wrong CRC checksum */
|
||||
#define RYM_ERR_CRC 0x73
|
||||
/* not enough data received */
|
||||
#define RYM_ERR_DSZ 0x74
|
||||
/* the transmission is aborted by user */
|
||||
#define RYM_ERR_CAN 0x75
|
||||
/* wrong answer, wrong ACK or C */
|
||||
#define RYM_ERR_ACK 0x76
|
||||
/* transmit file invalid */
|
||||
#define RYM_ERR_FILE 0x77
|
||||
/* RYM error code */
|
||||
RYM_ERR_TMO = 0x70, /* timeout on handshake */
|
||||
RYM_ERR_CODE = 0x71, /* wrong code, wrong SOH, STX etc */
|
||||
RYM_ERR_SEQ = 0x72, /* wrong sequence number */
|
||||
RYM_ERR_CRC = 0x73, /* wrong CRC checksum */
|
||||
RYM_ERR_DSZ = 0x74, /* not enough data received */
|
||||
RYM_ERR_CAN = 0x75, /* the transmission is aborted by user */
|
||||
RYM_ERR_ACK = 0x76, /* wrong answer, wrong ACK or C */
|
||||
RYM_ERR_FILE = 0x77, /* transmit file invalid */
|
||||
};
|
||||
|
||||
/* how many ticks wait for chars between packet. */
|
||||
#ifndef RYM_WAIT_CHR_TICK
|
||||
|
File diff suppressed because it is too large
Load Diff
8
documentation/doxygen/readme.md
Normal file
8
documentation/doxygen/readme.md
Normal file
@ -0,0 +1,8 @@
|
||||
# How to build doxygen html
|
||||
|
||||
1. download from https://doxygen.nl/index.html
|
||||
2. open `Doxywizard`
|
||||
3. `File` -> `Open`
|
||||
4. Open the file ./Doxyfile
|
||||
5. To tab `Run` , Click `Run doxygen`
|
||||
|
Loading…
x
Reference in New Issue
Block a user