forked from una1veritas/ARMWork
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7704df3
commit 9f4ff0d
Showing
3,739 changed files
with
1,335,127 additions
and
1,335,125 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains 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,2 @@ | ||
# Disable LF normalization for all files | ||
* -text |
This file contains 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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
#General build artifacts | ||
*.mk | ||
*.o | ||
*.a | ||
*.elf | ||
*.hex | ||
*.axf | ||
*.d | ||
*.lst | ||
*.map | ||
*.plg | ||
*.lnp | ||
*.crf | ||
*.tra | ||
*.sct | ||
*.bak | ||
*.dep | ||
|
||
#MDK-ARM | ||
*.__i | ||
*.htm | ||
*.uvgui.* | ||
*.uvopt | ||
*.axf | ||
|
||
#Eclipse | ||
.metadata | ||
|
||
#Mac | ||
.DS_Store | ||
|
||
#downloaded artifacts | ||
|
||
#General build artifacts | ||
*.mk | ||
*.o | ||
*.a | ||
*.elf | ||
*.hex | ||
*.axf | ||
*.d | ||
*.lst | ||
*.map | ||
*.plg | ||
*.lnp | ||
*.crf | ||
*.tra | ||
*.sct | ||
*.bak | ||
*.dep | ||
|
||
#MDK-ARM | ||
*.__i | ||
*.htm | ||
*.uvgui.* | ||
*.uvopt | ||
*.axf | ||
|
||
#Eclipse | ||
.metadata | ||
|
||
#Mac | ||
.DS_Store | ||
|
||
#downloaded artifacts | ||
|
This file contains 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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
/***********************************************************************/ | ||
/* This file is part of the ARM Compiler package */ | ||
/* Copyright KEIL ELEKTRONIK GmbH 1992-2004 */ | ||
/***********************************************************************/ | ||
/* */ | ||
/* RAM.INI: RAM Initialization File */ | ||
/* */ | ||
/***********************************************************************/ | ||
|
||
|
||
//*** <<< Use Configuration Wizard in Context Menu >>> *** | ||
|
||
FUNC void Pre_Setup (void) { | ||
_WDWORD(0x40048000, 0x00000002); // MEMMAP = 2 | ||
} | ||
|
||
FUNC void Setup (void) { | ||
SP = _RDWORD(0x00000000); | ||
PC = _RDWORD(0x00000004); | ||
} | ||
|
||
Pre_Setup(); | ||
|
||
LOAD .\Obj\blinky.axf INCREMENTAL // Download | ||
|
||
Setup(); // Setup for Running | ||
|
||
// g, main | ||
/***********************************************************************/ | ||
/* This file is part of the ARM Compiler package */ | ||
/* Copyright KEIL ELEKTRONIK GmbH 1992-2004 */ | ||
/***********************************************************************/ | ||
/* */ | ||
/* RAM.INI: RAM Initialization File */ | ||
/* */ | ||
/***********************************************************************/ | ||
|
||
|
||
//*** <<< Use Configuration Wizard in Context Menu >>> *** | ||
|
||
FUNC void Pre_Setup (void) { | ||
_WDWORD(0x40048000, 0x00000002); // MEMMAP = 2 | ||
} | ||
|
||
FUNC void Setup (void) { | ||
SP = _RDWORD(0x00000000); | ||
PC = _RDWORD(0x00000004); | ||
} | ||
|
||
Pre_Setup(); | ||
|
||
LOAD .\Obj\blinky.axf INCREMENTAL // Download | ||
|
||
Setup(); // Setup for Running | ||
|
||
// g, main |
This file contains 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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
/***********************************************************************/ | ||
/* This file is part of the ARM Compiler package */ | ||
/* Copyright KEIL ELEKTRONIK GmbH 1992-2004 */ | ||
/***********************************************************************/ | ||
/* */ | ||
/* RAM.INI: RAM Initialization File */ | ||
/* */ | ||
/***********************************************************************/ | ||
|
||
|
||
//*** <<< Use Configuration Wizard in Context Menu >>> *** | ||
FUNC void Pre_Setup (void) { | ||
_WDWORD(0x40048000, 0x00000001); // MEMMAP = 1 | ||
} | ||
|
||
FUNC void Setup (void) { | ||
SP = _RDWORD(0x10000000); | ||
PC = _RDWORD(0x10000004); | ||
} | ||
|
||
Pre_Setup(); | ||
|
||
LOAD .\Obj\blinky.axf INCREMENTAL // Download | ||
|
||
Setup(); // Setup for Running | ||
|
||
// g, main | ||
/***********************************************************************/ | ||
/* This file is part of the ARM Compiler package */ | ||
/* Copyright KEIL ELEKTRONIK GmbH 1992-2004 */ | ||
/***********************************************************************/ | ||
/* */ | ||
/* RAM.INI: RAM Initialization File */ | ||
/* */ | ||
/***********************************************************************/ | ||
|
||
|
||
//*** <<< Use Configuration Wizard in Context Menu >>> *** | ||
FUNC void Pre_Setup (void) { | ||
_WDWORD(0x40048000, 0x00000001); // MEMMAP = 1 | ||
} | ||
|
||
FUNC void Setup (void) { | ||
SP = _RDWORD(0x10000000); | ||
PC = _RDWORD(0x10000004); | ||
} | ||
|
||
Pre_Setup(); | ||
|
||
LOAD .\Obj\blinky.axf INCREMENTAL // Download | ||
|
||
Setup(); // Setup for Running | ||
|
||
// g, main |
This file contains 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Purpose: | ||
Simple blinky for LPC11Uxx | ||
|
||
Running mode: | ||
* Compile, Flash the program and reset. | ||
|
||
Output: | ||
PIO1_19 toggles continuously | ||
Purpose: | ||
Simple blinky for LPC11Uxx | ||
Running mode: | ||
* Compile, Flash the program and reset. | ||
Output: | ||
PIO1_19 toggles continuously |
This file contains 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 |
---|---|---|
@@ -1,91 +1,91 @@ | ||
/**************************************************************************** | ||
* $Id:: blinky.c 9190 2012-02-16 20:59:45Z nxp41306 $ | ||
* Project: NXP LPC11xx Blinky example | ||
* | ||
* Description: | ||
* This file contains LED blink code example which include timer, | ||
* GPIO initialization, and clock monitoring. | ||
* | ||
**************************************************************************** | ||
* Software that is described herein is for illustrative purposes only | ||
* which provides customers with programming information regarding the | ||
* products. This software is supplied "AS IS" without any warranties. | ||
* NXP Semiconductors assumes no responsibility or liability for the | ||
* use of the software, conveys no license or title under any patent, | ||
* copyright, or mask work right to the product. NXP Semiconductors | ||
* reserves the right to make changes in the software without | ||
* notification. NXP Semiconductors also make no representation or | ||
* warranty that such application will be suitable for the specified | ||
* use without further testing or modification. | ||
****************************************************************************/ | ||
#include "LPC11Uxx.h" /* LPC11Uxx definitions */ | ||
#include "timer16.h" | ||
#include "clkconfig.h" | ||
#include "gpio.h" | ||
#include "nmi.h" | ||
|
||
#define TEST_TIMER_NUM 0 /* 0 or 1 for 16-bit timers only */ | ||
|
||
extern volatile uint32_t timer16_0_counter[2]; | ||
extern volatile uint32_t timer16_1_counter[2]; | ||
|
||
/* Main Program */ | ||
|
||
int main (void) { | ||
uint32_t interval; | ||
|
||
SystemCoreClockUpdate(); | ||
|
||
/* Config CLKOUT, mostly used for debugging. */ | ||
CLKOUT_Setup( CLKOUTCLK_SRC_MAIN_CLK ); | ||
LPC_IOCON->PIO0_1 &= ~0x07; | ||
LPC_IOCON->PIO0_1 |= 0x01; /* CLK OUT */ | ||
|
||
/* Enable AHB clock to the GPIO domain. */ | ||
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<6); | ||
|
||
/* TEST_TIMER_NUM is either 0 or 1 for 16-bit timer 0 or 1. */ | ||
interval = SystemCoreClock/1000 - 1; | ||
if ( interval > 0xFFFF ) | ||
{ | ||
interval = 0xFFFF; | ||
} | ||
init_timer16(TEST_TIMER_NUM, interval); | ||
enable_timer16(TEST_TIMER_NUM); | ||
|
||
/* Set port 1_19 to output */ | ||
GPIOSetDir( 1, 19, 1 ); | ||
|
||
while (1) /* Loop forever */ | ||
{ | ||
#if TEST_TIMER_NUM | ||
/* I/O configuration and LED setting pending. */ | ||
if ( (timer16_1_counter[0] > 0) && (timer16_1_counter[0] <= 200) ) | ||
{ | ||
GPIOSetBitValue( 1, 19, 0 ); | ||
} | ||
if ( (timer16_1_counter[0] > 200) && (timer16_1_counter[0] <= 400) ) | ||
{ | ||
GPIOSetBitValue( 1, 19, 1 ); | ||
} | ||
else if ( timer16_1_counter[0] > 400 ) | ||
{ | ||
timer16_1_counter[0] = 0; | ||
} | ||
#else | ||
/* I/O configuration and LED setting pending. */ | ||
if ( (timer16_0_counter[0] > 0) && (timer16_0_counter[0] <= 200) ) | ||
{ | ||
GPIOSetBitValue( 1, 19, 0 ); | ||
} | ||
if ( (timer16_0_counter[0] > 200) && (timer16_0_counter[0] <= 400) ) | ||
{ | ||
GPIOSetBitValue( 1, 19, 1 ); | ||
} | ||
else if ( timer16_0_counter[0] > 400 ) | ||
{ | ||
timer16_0_counter[0] = 0; | ||
} | ||
#endif | ||
} | ||
} | ||
/**************************************************************************** | ||
* $Id:: blinky.c 9190 2012-02-16 20:59:45Z nxp41306 $ | ||
* Project: NXP LPC11xx Blinky example | ||
* | ||
* Description: | ||
* This file contains LED blink code example which include timer, | ||
* GPIO initialization, and clock monitoring. | ||
* | ||
**************************************************************************** | ||
* Software that is described herein is for illustrative purposes only | ||
* which provides customers with programming information regarding the | ||
* products. This software is supplied "AS IS" without any warranties. | ||
* NXP Semiconductors assumes no responsibility or liability for the | ||
* use of the software, conveys no license or title under any patent, | ||
* copyright, or mask work right to the product. NXP Semiconductors | ||
* reserves the right to make changes in the software without | ||
* notification. NXP Semiconductors also make no representation or | ||
* warranty that such application will be suitable for the specified | ||
* use without further testing or modification. | ||
****************************************************************************/ | ||
#include "LPC11Uxx.h" /* LPC11Uxx definitions */ | ||
#include "timer16.h" | ||
#include "clkconfig.h" | ||
#include "gpio.h" | ||
#include "nmi.h" | ||
|
||
#define TEST_TIMER_NUM 0 /* 0 or 1 for 16-bit timers only */ | ||
|
||
extern volatile uint32_t timer16_0_counter[2]; | ||
extern volatile uint32_t timer16_1_counter[2]; | ||
|
||
/* Main Program */ | ||
|
||
int main (void) { | ||
uint32_t interval; | ||
|
||
SystemCoreClockUpdate(); | ||
|
||
/* Config CLKOUT, mostly used for debugging. */ | ||
CLKOUT_Setup( CLKOUTCLK_SRC_MAIN_CLK ); | ||
LPC_IOCON->PIO0_1 &= ~0x07; | ||
LPC_IOCON->PIO0_1 |= 0x01; /* CLK OUT */ | ||
|
||
/* Enable AHB clock to the GPIO domain. */ | ||
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<6); | ||
|
||
/* TEST_TIMER_NUM is either 0 or 1 for 16-bit timer 0 or 1. */ | ||
interval = SystemCoreClock/1000 - 1; | ||
if ( interval > 0xFFFF ) | ||
{ | ||
interval = 0xFFFF; | ||
} | ||
init_timer16(TEST_TIMER_NUM, interval); | ||
enable_timer16(TEST_TIMER_NUM); | ||
|
||
/* Set port 1_19 to output */ | ||
GPIOSetDir( 1, 19, 1 ); | ||
|
||
while (1) /* Loop forever */ | ||
{ | ||
#if TEST_TIMER_NUM | ||
/* I/O configuration and LED setting pending. */ | ||
if ( (timer16_1_counter[0] > 0) && (timer16_1_counter[0] <= 200) ) | ||
{ | ||
GPIOSetBitValue( 1, 19, 0 ); | ||
} | ||
if ( (timer16_1_counter[0] > 200) && (timer16_1_counter[0] <= 400) ) | ||
{ | ||
GPIOSetBitValue( 1, 19, 1 ); | ||
} | ||
else if ( timer16_1_counter[0] > 400 ) | ||
{ | ||
timer16_1_counter[0] = 0; | ||
} | ||
#else | ||
/* I/O configuration and LED setting pending. */ | ||
if ( (timer16_0_counter[0] > 0) && (timer16_0_counter[0] <= 200) ) | ||
{ | ||
GPIOSetBitValue( 1, 19, 0 ); | ||
} | ||
if ( (timer16_0_counter[0] > 200) && (timer16_0_counter[0] <= 400) ) | ||
{ | ||
GPIOSetBitValue( 1, 19, 1 ); | ||
} | ||
else if ( timer16_0_counter[0] > 400 ) | ||
{ | ||
timer16_0_counter[0] = 0; | ||
} | ||
#endif | ||
} | ||
} |
Oops, something went wrong.