Browse Source

frameworks whitespace cleanup

Scott Lahteine 7 years ago
parent
commit
9dd5390d7d

+ 13
- 13
frameworks/CMSIS/LPC1768/Re-ARM/startup_LPC17xx.S View File

1
 /* File: startup_ARMCM3.s
1
 /* File: startup_ARMCM3.s
2
- * Purpose: startup file for Cortex-M3/M4 devices. Should use with 
2
+ * Purpose: startup file for Cortex-M3/M4 devices. Should use with
3
  *   GNU Tools for ARM Embedded Processors
3
  *   GNU Tools for ARM Embedded Processors
4
  * Version: V1.1
4
  * Version: V1.1
5
  * Date: 17 June 2011
5
  * Date: 17 June 2011
6
- * 
6
+ *
7
  * Copyright (C) 2011 ARM Limited. All rights reserved.
7
  * Copyright (C) 2011 ARM Limited. All rights reserved.
8
- * ARM Limited (ARM) is supplying this software for use with Cortex-M3/M4 
9
- * processor based microcontrollers.  This file can be freely distributed 
10
- * within development tools that are supporting such ARM based processors. 
8
+ * ARM Limited (ARM) is supplying this software for use with Cortex-M3/M4
9
+ * processor based microcontrollers.  This file can be freely distributed
10
+ * within development tools that are supporting such ARM based processors.
11
  *
11
  *
12
  * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
12
  * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
13
  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
13
  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20
 
20
 
21
 /* Memory Model
21
 /* Memory Model
22
    The HEAP starts at the end of the DATA section and grows upward.
22
    The HEAP starts at the end of the DATA section and grows upward.
23
-   
23
+
24
    The STACK starts at the end of the RAM and grows downward.
24
    The STACK starts at the end of the RAM and grows downward.
25
-   
25
+
26
    The HEAP and stack STACK are only checked at compile time:
26
    The HEAP and stack STACK are only checked at compile time:
27
    (DATA_SIZE + HEAP_SIZE + STACK_SIZE) < RAM_SIZE
27
    (DATA_SIZE + HEAP_SIZE + STACK_SIZE) < RAM_SIZE
28
-   
28
+
29
    This is just a check for the bare minimum for the Heap+Stack area before
29
    This is just a check for the bare minimum for the Heap+Stack area before
30
    aborting compilation, it is not the run time limit:
30
    aborting compilation, it is not the run time limit:
31
    Heap_Size + Stack_Size = 0x80 + 0x80 = 0x100
31
    Heap_Size + Stack_Size = 0x80 + 0x80 = 0x100
59
     .size __HeapBase, . - __HeapBase
59
     .size __HeapBase, . - __HeapBase
60
 __HeapLimit:
60
 __HeapLimit:
61
     .size __HeapLimit, . - __HeapLimit
61
     .size __HeapLimit, . - __HeapLimit
62
-    
62
+
63
     .section .isr_vector
63
     .section .isr_vector
64
     .align 2
64
     .align 2
65
     .globl __isr_vector
65
     .globl __isr_vector
128
     .type    Reset_Handler, %function
128
     .type    Reset_Handler, %function
129
 Reset_Handler:
129
 Reset_Handler:
130
 /*     Loop to copy data from read only memory to RAM. The ranges
130
 /*     Loop to copy data from read only memory to RAM. The ranges
131
- *      of copy from/to are specified by following symbols evaluated in 
131
+ *      of copy from/to are specified by following symbols evaluated in
132
  *      linker script.
132
  *      linker script.
133
  *      _etext: End of code section, i.e., begin of data sections to copy from.
133
  *      _etext: End of code section, i.e., begin of data sections to copy from.
134
  *      __data_start__/__data_end__: RAM address range that data should be
134
  *      __data_start__/__data_end__: RAM address range that data should be
153
     bx    r0
153
     bx    r0
154
     .pool
154
     .pool
155
     .size Reset_Handler, . - Reset_Handler
155
     .size Reset_Handler, . - Reset_Handler
156
-    
156
+
157
 /*    Macro to define default handlers. Default handler
157
 /*    Macro to define default handlers. Default handler
158
  *    will be weak symbol and just dead loops. They can be
158
  *    will be weak symbol and just dead loops. They can be
159
  *    overwritten by other handlers */
159
  *    overwritten by other handlers */
166
     b    .
166
     b    .
167
     .size    \handler_name, . - \handler_name
167
     .size    \handler_name, . - \handler_name
168
     .endm
168
     .endm
169
-    
169
+
170
     def_default_handler    NMI_Handler
170
     def_default_handler    NMI_Handler
171
     def_default_handler    HardFault_Handler
171
     def_default_handler    HardFault_Handler
172
     def_default_handler    MemManage_Handler
172
     def_default_handler    MemManage_Handler
177
     def_default_handler    PendSV_Handler
177
     def_default_handler    PendSV_Handler
178
     def_default_handler    SysTick_Handler
178
     def_default_handler    SysTick_Handler
179
     def_default_handler    Default_Handler
179
     def_default_handler    Default_Handler
180
-    
180
+
181
     def_default_handler     WDT_IRQHandler
181
     def_default_handler     WDT_IRQHandler
182
     def_default_handler     TIMER0_IRQHandler
182
     def_default_handler     TIMER0_IRQHandler
183
     def_default_handler     TIMER1_IRQHandler
183
     def_default_handler     TIMER1_IRQHandler

+ 23
- 23
frameworks/CMSIS/LPC1768/driver/lpc17xx_i2c.c View File

188
 	{
188
 	{
189
 		return CodeStatus;
189
 		return CodeStatus;
190
 	}
190
 	}
191
-	
191
+
192
 	/* Make sure start bit is not active */
192
 	/* Make sure start bit is not active */
193
 	if (I2Cx->I2CONSET & I2C_I2CONSET_STA)
193
 	if (I2Cx->I2CONSET & I2C_I2CONSET_STA)
194
 	{
194
 	{
216
 static uint32_t I2C_GetByte (LPC_I2C_TypeDef *I2Cx, uint8_t *retdat, Bool ack)
216
 static uint32_t I2C_GetByte (LPC_I2C_TypeDef *I2Cx, uint8_t *retdat, Bool ack)
217
 {
217
 {
218
 	*retdat = (uint8_t) (I2Cx->I2DAT & I2C_I2DAT_BITMASK);
218
 	*retdat = (uint8_t) (I2Cx->I2DAT & I2C_I2DAT_BITMASK);
219
-	
219
+
220
 	if (ack == TRUE)
220
 	if (ack == TRUE)
221
 	{
221
 	{
222
 		I2Cx->I2CONSET = I2C_I2CONSET_AA;
222
 		I2Cx->I2CONSET = I2C_I2CONSET_AA;
227
 	}
227
 	}
228
 
228
 
229
 	I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
229
 	I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
230
-	
230
+
231
 	return (I2Cx->I2STAT & I2C_STAT_CODE_BITMASK);
231
 	return (I2Cx->I2STAT & I2C_STAT_CODE_BITMASK);
232
 }
232
 }
233
 
233
 
454
 	uint8_t *rxdat;
454
 	uint8_t *rxdat;
455
 	uint8_t tmp;
455
 	uint8_t tmp;
456
 	int32_t Ret = I2C_OK;
456
 	int32_t Ret = I2C_OK;
457
-	
457
+
458
 	//get buffer to send/receive
458
 	//get buffer to send/receive
459
 	txdat = (uint8_t *) &TransferCfg->tx_data[TransferCfg->tx_count];
459
 	txdat = (uint8_t *) &TransferCfg->tx_data[TransferCfg->tx_count];
460
 	rxdat = (uint8_t *) &TransferCfg->rx_data[TransferCfg->rx_count];
460
 	rxdat = (uint8_t *) &TransferCfg->rx_data[TransferCfg->rx_count];
481
 			break;
481
 			break;
482
 		case I2C_I2STAT_M_TX_SLAW_ACK:
482
 		case I2C_I2STAT_M_TX_SLAW_ACK:
483
 		case I2C_I2STAT_M_TX_DAT_ACK:
483
 		case I2C_I2STAT_M_TX_DAT_ACK:
484
-			
484
+
485
 			if(TransferCfg->tx_count < TransferCfg->tx_length)
485
 			if(TransferCfg->tx_count < TransferCfg->tx_length)
486
 			{
486
 			{
487
 				I2C_SendByte(I2Cx, *txdat);
487
 				I2C_SendByte(I2Cx, *txdat);
488
-				
488
+
489
 				txdat++;
489
 				txdat++;
490
 
490
 
491
 				TransferCfg->tx_count++;
491
 				TransferCfg->tx_count++;
497
 				I2C_Stop(I2Cx);
497
 				I2C_Stop(I2Cx);
498
 
498
 
499
 				Ret = I2C_SEND_END;
499
 				Ret = I2C_SEND_END;
500
-				
500
+
501
 			}
501
 			}
502
 			break;
502
 			break;
503
 		case I2C_I2STAT_M_TX_DAT_NACK:
503
 		case I2C_I2STAT_M_TX_DAT_NACK:
537
 			 {
537
 			 {
538
 				Ret = I2C_RECV_END;
538
 				Ret = I2C_RECV_END;
539
 			}
539
 			}
540
-			
540
+
541
 			break;
541
 			break;
542
 		case I2C_I2STAT_M_RX_DAT_NACK:
542
 		case I2C_I2STAT_M_RX_DAT_NACK:
543
 			I2C_GetByte(I2Cx, &tmp, FALSE);
543
 			I2C_GetByte(I2Cx, &tmp, FALSE);
559
 			I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
559
 			I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
560
 			break;
560
 			break;
561
 	}
561
 	}
562
-	
562
+
563
 	return Ret;
563
 	return Ret;
564
 }
564
 }
565
 
565
 
592
 	//get buffer to send/receive
592
 	//get buffer to send/receive
593
 	txdat = (uint8_t *) &TransferCfg->tx_data[TransferCfg->tx_count];
593
 	txdat = (uint8_t *) &TransferCfg->tx_data[TransferCfg->tx_count];
594
 	rxdat = (uint8_t *) &TransferCfg->rx_data[TransferCfg->rx_count];
594
 	rxdat = (uint8_t *) &TransferCfg->rx_data[TransferCfg->rx_count];
595
-	
595
+
596
 	switch (CodeStatus)
596
 	switch (CodeStatus)
597
 	{
597
 	{
598
 		/* Reading phase -------------------------------------------------------- */
598
 		/* Reading phase -------------------------------------------------------- */
636
 				I2Cx->I2CONSET = I2C_I2CONSET_AA;
636
 				I2Cx->I2CONSET = I2C_I2CONSET_AA;
637
 				I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
637
 				I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
638
 			}
638
 			}
639
-			
639
+
640
 			break;
640
 			break;
641
 		/* DATA has been received, Only the first data byte will be received with ACK. Additional
641
 		/* DATA has been received, Only the first data byte will be received with ACK. Additional
642
 				data will be received with NOT ACK. */
642
 				data will be received with NOT ACK. */
688
 			I2Cx->I2CONSET = I2C_I2CONSET_AA|I2C_I2CONSET_STA;
688
 			I2Cx->I2CONSET = I2C_I2CONSET_AA|I2C_I2CONSET_STA;
689
 			I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
689
 			I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
690
 			break;
690
 			break;
691
-			
691
+
692
 		case I2C_I2STAT_S_TX_LAST_DAT_ACK:
692
 		case I2C_I2STAT_S_TX_LAST_DAT_ACK:
693
 		/* Data has been transmitted, NACK has been received,
693
 		/* Data has been transmitted, NACK has been received,
694
 		 * that means there's no more data to send, exit now */
694
 		 * that means there's no more data to send, exit now */
729
 			I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
729
 			I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
730
 			Ret = I2C_STA_STO_RECV;
730
 			Ret = I2C_STA_STO_RECV;
731
 			break;
731
 			break;
732
-		
732
+
733
 		/* No status information */
733
 		/* No status information */
734
 		case I2C_I2STAT_NO_INF:
734
 		case I2C_I2STAT_NO_INF:
735
 		/* Other status must be captured */
735
 		/* Other status must be captured */
737
 			I2Cx->I2CONSET = I2C_I2CONSET_AA;
737
 			I2Cx->I2CONSET = I2C_I2CONSET_AA;
738
 			I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
738
 			I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
739
 			break;
739
 			break;
740
-		
740
+
741
 	}
741
 	}
742
 
742
 
743
 	return Ret;
743
 	return Ret;
787
 	else if (Ret & I2C_SEND_END)
787
 	else if (Ret & I2C_SEND_END)
788
 	{
788
 	{
789
 		// If no need to wait for data from Slave
789
 		// If no need to wait for data from Slave
790
-		if(txrx_setup->rx_count >= (txrx_setup->rx_length)) 
790
+		if(txrx_setup->rx_count >= (txrx_setup->rx_length))
791
 		{
791
 		{
792
 			goto s_int_end;
792
 			goto s_int_end;
793
 		}
793
 		}
799
 	       		return;
799
 	       		return;
800
 		}
800
 		}
801
 	}
801
 	}
802
-	else if (Ret & I2C_RECV_END) 
802
+	else if (Ret & I2C_RECV_END)
803
 	{
803
 	{
804
 		goto s_int_end;
804
 		goto s_int_end;
805
 	}
805
 	}
815
 	I2Cx->I2CONCLR = I2C_I2CONCLR_AAC | I2C_I2CONCLR_SIC | I2C_I2CONCLR_STAC;
815
 	I2Cx->I2CONCLR = I2C_I2CONCLR_AAC | I2C_I2CONCLR_SIC | I2C_I2CONCLR_STAC;
816
 
816
 
817
 	I2C_MasterComplete[i2cId] = TRUE;
817
 	I2C_MasterComplete[i2cId] = TRUE;
818
-		
818
+
819
 }
819
 }
820
 
820
 
821
 
821
 
874
 					goto s_int_end;
874
 					goto s_int_end;
875
 				}
875
 				}
876
 			}
876
 			}
877
-		}	
877
+		}
878
 	}
878
 	}
879
 	else if(Ret &I2C_SEND_END)
879
 	else if(Ret &I2C_SEND_END)
880
 	{
880
 	{
937
 
937
 
938
 		// Start command
938
 		// Start command
939
 		CodeStatus = I2C_Start(I2Cx);
939
 		CodeStatus = I2C_Start(I2Cx);
940
-		
940
+
941
 		while(1)	// send data first and then receive data from Slave.
941
 		while(1)	// send data first and then receive data from Slave.
942
 		{
942
 		{
943
 			Ret = I2C_MasterHanleStates(I2Cx, CodeStatus, TransferCfg);
943
 			Ret = I2C_MasterHanleStates(I2Cx, CodeStatus, TransferCfg);
955
 			else if( (Ret & I2C_BYTE_SENT) ||
955
 			else if( (Ret & I2C_BYTE_SENT) ||
956
 					(Ret & I2C_BYTE_RECV))
956
 					(Ret & I2C_BYTE_RECV))
957
 			{
957
 			{
958
-				// Wait for sending ends				
958
+				// Wait for sending ends
959
 				while (!(I2Cx->I2CONSET & I2C_I2CONSET_SI));
959
 				while (!(I2Cx->I2CONSET & I2C_I2CONSET_SI));
960
 			}
960
 			}
961
 			else if (Ret & I2C_SEND_END) // already send all data
961
 			else if (Ret & I2C_SEND_END) // already send all data
962
 			{
962
 			{
963
 				// If no need to wait for data from Slave
963
 				// If no need to wait for data from Slave
964
-				if(TransferCfg->rx_count >= (TransferCfg->rx_length)) 
964
+				if(TransferCfg->rx_count >= (TransferCfg->rx_length))
965
 				{
965
 				{
966
 					break;
966
 					break;
967
 				}
967
 				}
1037
 								I2C_TRANSFER_OPT_Type Opt)
1037
 								I2C_TRANSFER_OPT_Type Opt)
1038
 {
1038
 {
1039
 	int32_t   Ret = I2C_OK;
1039
 	int32_t   Ret = I2C_OK;
1040
-	
1040
+
1041
 	uint32_t CodeStatus;
1041
 	uint32_t CodeStatus;
1042
 	uint32_t timeout;
1042
 	uint32_t timeout;
1043
 	int32_t time_en;
1043
 	int32_t time_en;
1052
 	{
1052
 	{
1053
 		/* Set AA bit to ACK command on I2C bus */
1053
 		/* Set AA bit to ACK command on I2C bus */
1054
 		I2Cx->I2CONSET = I2C_I2CONSET_AA;
1054
 		I2Cx->I2CONSET = I2C_I2CONSET_AA;
1055
-		
1055
+
1056
 		/* Clear SI bit to be ready ... */
1056
 		/* Clear SI bit to be ready ... */
1057
 		I2Cx->I2CONCLR = (I2C_I2CONCLR_SIC | I2C_I2CONCLR_STAC|I2C_I2CONCLR_STOC);
1057
 		I2Cx->I2CONCLR = (I2C_I2CONCLR_SIC | I2C_I2CONCLR_STAC|I2C_I2CONCLR_STOC);
1058
 
1058
 

+ 2
- 2
frameworks/CMSIS/LPC1768/driver/lpc17xx_i2s.c View File

331
 	uint16_t dif;
331
 	uint16_t dif;
332
 	uint16_t x_divide, y_divide;
332
 	uint16_t x_divide, y_divide;
333
 	uint16_t err, ErrorOptimal = 0xFFFF;
333
 	uint16_t err, ErrorOptimal = 0xFFFF;
334
-	
334
+
335
 	uint32_t N;
335
 	uint32_t N;
336
 
336
 
337
 	CHECK_PARAM(PARAM_I2Sx(I2Sx));
337
 	CHECK_PARAM(PARAM_I2Sx(I2Sx));
360
 	 * The formula is:
360
 	 * The formula is:
361
 	 * 		I2S_MCLK = PCLK_I2S * (X/Y) / 2
361
 	 * 		I2S_MCLK = PCLK_I2S * (X/Y) / 2
362
      * In that, Y must be greater than or equal to X. X should divides evenly
362
      * In that, Y must be greater than or equal to X. X should divides evenly
363
-     * into Y. 
363
+     * into Y.
364
 	 * We have:
364
 	 * We have:
365
 	 * 		I2S_MCLK = Freq * channel*wordwidth * (I2STXBITRATE+1);
365
 	 * 		I2S_MCLK = Freq * channel*wordwidth * (I2STXBITRATE+1);
366
 	 * So: (X/Y) = (Freq * channel*wordwidth * (I2STXBITRATE+1))*2/PCLK_I2S
366
 	 * So: (X/Y) = (Freq * channel*wordwidth * (I2STXBITRATE+1))*2/PCLK_I2S

+ 32
- 32
frameworks/CMSIS/LPC1768/include/arm_common_tables.h View File

1
-/* ---------------------------------------------------------------------- 
2
-* Copyright (C) 2010 ARM Limited. All rights reserved. 
3
-* 
4
-* $Date:        11. November 2010  
5
-* $Revision: 	V1.0.2  
6
-* 
7
-* Project: 	    CMSIS DSP Library 
8
-* Title:	    arm_common_tables.h 
9
-* 
10
-* Description:	This file has extern declaration for common tables like Bitreverse, reciprocal etc which are used across different functions 
11
-* 
1
+/* ----------------------------------------------------------------------
2
+* Copyright (C) 2010 ARM Limited. All rights reserved.
3
+*
4
+* $Date:        11. November 2010
5
+* $Revision: 	V1.0.2
6
+*
7
+* Project: 	    CMSIS DSP Library
8
+* Title:	    arm_common_tables.h
9
+*
10
+* Description:	This file has extern declaration for common tables like Bitreverse, reciprocal etc which are used across different functions
11
+*
12
 * Target Processor: Cortex-M4/Cortex-M3
12
 * Target Processor: Cortex-M4/Cortex-M3
13
-*  
14
-* Version 1.0.2 2010/11/11 
15
-*    Documentation updated.  
16
-* 
17
-* Version 1.0.1 2010/10/05  
18
-*    Production release and review comments incorporated. 
19
-* 
20
-* Version 1.0.0 2010/09/20  
21
-*    Production release and review comments incorporated. 
22
-* -------------------------------------------------------------------- */ 
23
- 
24
-#ifndef _ARM_COMMON_TABLES_H 
25
-#define _ARM_COMMON_TABLES_H 
26
- 
27
-#include "arm_math.h" 
28
- 
29
-extern uint16_t armBitRevTable[256]; 
30
-extern q15_t armRecipTableQ15[64]; 
31
-extern q31_t armRecipTableQ31[64]; 
13
+*
14
+* Version 1.0.2 2010/11/11
15
+*    Documentation updated.
16
+*
17
+* Version 1.0.1 2010/10/05
18
+*    Production release and review comments incorporated.
19
+*
20
+* Version 1.0.0 2010/09/20
21
+*    Production release and review comments incorporated.
22
+* -------------------------------------------------------------------- */
23
+
24
+#ifndef _ARM_COMMON_TABLES_H
25
+#define _ARM_COMMON_TABLES_H
26
+
27
+#include "arm_math.h"
28
+
29
+extern uint16_t armBitRevTable[256];
30
+extern q15_t armRecipTableQ15[64];
31
+extern q31_t armRecipTableQ31[64];
32
 extern const q31_t realCoefAQ31[1024];
32
 extern const q31_t realCoefAQ31[1024];
33
 extern const q31_t realCoefBQ31[1024];
33
 extern const q31_t realCoefBQ31[1024];
34
- 
35
-#endif /*  ARM_COMMON_TABLES_H */ 
34
+
35
+#endif /*  ARM_COMMON_TABLES_H */

+ 11
- 11
frameworks/CMSIS/LPC1768/include/core_cmFunc.h View File

8
  * Copyright (C) 2009-2011 ARM Limited. All rights reserved.
8
  * Copyright (C) 2009-2011 ARM Limited. All rights reserved.
9
  *
9
  *
10
  * @par
10
  * @par
11
- * ARM Limited (ARM) is supplying this software for use with Cortex-M 
12
- * processor based microcontrollers.  This file can be freely distributed 
13
- * within development tools that are supporting such ARM based processors. 
11
+ * ARM Limited (ARM) is supplying this software for use with Cortex-M
12
+ * processor based microcontrollers.  This file can be freely distributed
13
+ * within development tools that are supporting such ARM based processors.
14
  *
14
  *
15
  * @par
15
  * @par
16
  * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
16
  * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
26
 
26
 
27
 
27
 
28
 /* ###########################  Core Function Access  ########################### */
28
 /* ###########################  Core Function Access  ########################### */
29
-/** \ingroup  CMSIS_Core_FunctionInterface   
29
+/** \ingroup  CMSIS_Core_FunctionInterface
30
     \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
30
     \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
31
   @{
31
   @{
32
  */
32
  */
182
   register uint32_t __regPriMask         __ASM("primask");
182
   register uint32_t __regPriMask         __ASM("primask");
183
   __regPriMask = (priMask);
183
   __regPriMask = (priMask);
184
 }
184
 }
185
- 
185
+
186
 
186
 
187
 #if       (__CORTEX_M >= 0x03)
187
 #if       (__CORTEX_M >= 0x03)
188
 
188
 
226
   register uint32_t __regBasePri         __ASM("basepri");
226
   register uint32_t __regBasePri         __ASM("basepri");
227
   __regBasePri = (basePri & 0xff);
227
   __regBasePri = (basePri & 0xff);
228
 }
228
 }
229
- 
229
+
230
 
230
 
231
 /** \brief  Get Fault Mask
231
 /** \brief  Get Fault Mask
232
 
232
 
407
   __ASM volatile ("MRS %0, psp\n"  : "=r" (result) );
407
   __ASM volatile ("MRS %0, psp\n"  : "=r" (result) );
408
   return(result);
408
   return(result);
409
 }
409
 }
410
- 
410
+
411
 
411
 
412
 /** \brief  Set Process Stack Pointer
412
 /** \brief  Set Process Stack Pointer
413
 
413
 
434
   __ASM volatile ("MRS %0, msp\n" : "=r" (result) );
434
   __ASM volatile ("MRS %0, msp\n" : "=r" (result) );
435
   return(result);
435
   return(result);
436
 }
436
 }
437
- 
437
+
438
 
438
 
439
 /** \brief  Set Main Stack Pointer
439
 /** \brief  Set Main Stack Pointer
440
 
440
 
473
 {
473
 {
474
   __ASM volatile ("MSR primask, %0" : : "r" (priMask) );
474
   __ASM volatile ("MSR primask, %0" : : "r" (priMask) );
475
 }
475
 }
476
- 
476
+
477
 
477
 
478
 #if       (__CORTEX_M >= 0x03)
478
 #if       (__CORTEX_M >= 0x03)
479
 
479
 
508
 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_BASEPRI(void)
508
 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_BASEPRI(void)
509
 {
509
 {
510
   uint32_t result;
510
   uint32_t result;
511
-  
511
+
512
   __ASM volatile ("MRS %0, basepri_max" : "=r" (result) );
512
   __ASM volatile ("MRS %0, basepri_max" : "=r" (result) );
513
   return(result);
513
   return(result);
514
 }
514
 }
535
 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FAULTMASK(void)
535
 __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FAULTMASK(void)
536
 {
536
 {
537
   uint32_t result;
537
   uint32_t result;
538
-  
538
+
539
   __ASM volatile ("MRS %0, faultmask" : "=r" (result) );
539
   __ASM volatile ("MRS %0, faultmask" : "=r" (result) );
540
   return(result);
540
   return(result);
541
 }
541
 }

+ 3
- 3
frameworks/CMSIS/LPC1768/include/lpc17xx_iap.h View File

7
 * @version	1.0
7
 * @version	1.0
8
 * @date		18. April. 2012
8
 * @date		18. April. 2012
9
 * @author	NXP MCU SW Application Team
9
 * @author	NXP MCU SW Application Team
10
-* 
10
+*
11
 * Copyright(C) 2011, NXP Semiconductor
11
 * Copyright(C) 2011, NXP Semiconductor
12
 * All rights reserved.
12
 * All rights reserved.
13
 *
13
 *
112
 /**
112
 /**
113
  * @}
113
  * @}
114
  */
114
  */
115
- 
115
+
116
 /* Public Functions ----------------------------------------------------------- */
116
 /* Public Functions ----------------------------------------------------------- */
117
 /** @defgroup IAP_Public_Functions IAP Public Functions
117
 /** @defgroup IAP_Public_Functions IAP Public Functions
118
  * @{
118
  * @{
128
 IAP_STATUS_CODE EraseSector(uint32_t start_sec, uint32_t end_sec);
128
 IAP_STATUS_CODE EraseSector(uint32_t start_sec, uint32_t end_sec);
129
 /**  Blank check sectors */
129
 /**  Blank check sectors */
130
 IAP_STATUS_CODE BlankCheckSector(uint32_t start_sec, uint32_t end_sec,
130
 IAP_STATUS_CODE BlankCheckSector(uint32_t start_sec, uint32_t end_sec,
131
-                                 uint32_t *first_nblank_loc, 
131
+                                 uint32_t *first_nblank_loc,
132
 								 uint32_t *first_nblank_val);
132
 								 uint32_t *first_nblank_val);
133
 /**  Read part identification number */
133
 /**  Read part identification number */
134
 IAP_STATUS_CODE ReadPartID(uint32_t *partID);
134
 IAP_STATUS_CODE ReadPartID(uint32_t *partID);

+ 6
- 6
frameworks/CMSIS/LPC1768/include/system_LPC17xx.h View File

1
 /******************************************************************************
1
 /******************************************************************************
2
  * @file:    system_LPC17xx.h
2
  * @file:    system_LPC17xx.h
3
  * @purpose: CMSIS Cortex-M3 Device Peripheral Access Layer Header File
3
  * @purpose: CMSIS Cortex-M3 Device Peripheral Access Layer Header File
4
- *           for the NXP LPC17xx Device Series 
4
+ *           for the NXP LPC17xx Device Series
5
  * @version: V1.02
5
  * @version: V1.02
6
  * @date:    27. July 2009
6
  * @date:    27. July 2009
7
  *----------------------------------------------------------------------------
7
  *----------------------------------------------------------------------------
8
  *
8
  *
9
  * Copyright (C) 2009 ARM Limited. All rights reserved.
9
  * Copyright (C) 2009 ARM Limited. All rights reserved.
10
  *
10
  *
11
- * ARM Limited (ARM) is supplying this software for use with Cortex-M3 
12
- * processor based microcontrollers.  This file can be freely distributed 
13
- * within development tools that are supporting such ARM based processors. 
11
+ * ARM Limited (ARM) is supplying this software for use with Cortex-M3
12
+ * processor based microcontrollers.  This file can be freely distributed
13
+ * within development tools that are supporting such ARM based processors.
14
  *
14
  *
15
  * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
15
  * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
16
  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
16
  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
26
 
26
 
27
 #ifdef __cplusplus
27
 #ifdef __cplusplus
28
  extern "C" {
28
  extern "C" {
29
-#endif 
29
+#endif
30
 
30
 
31
 extern uint32_t SystemCoreClock;     /*!< System Clock Frequency (Core Clock)  */
31
 extern uint32_t SystemCoreClock;     /*!< System Clock Frequency (Core Clock)  */
32
 
32
 
48
  * @param  none
48
  * @param  none
49
  * @return none
49
  * @return none
50
  *
50
  *
51
- * @brief  Updates the SystemCoreClock with current core Clock 
51
+ * @brief  Updates the SystemCoreClock with current core Clock
52
  *         retrieved from cpu registers.
52
  *         retrieved from cpu registers.
53
  */
53
  */
54
 extern void SystemCoreClockUpdate (void);
54
 extern void SystemCoreClockUpdate (void);

+ 3
- 3
frameworks/CMSIS/library.json View File

1
 {
1
 {
2
-  "name": "CMSIS-LPC1768", 
2
+  "name": "CMSIS-LPC1768",
3
   "version": "0.0.0",
3
   "version": "0.0.0",
4
-  "frameworks": [], 
4
+  "frameworks": [],
5
   "platforms": [
5
   "platforms": [
6
-      "nxplpc", 
6
+      "nxplpc",
7
       "ststm32"
7
       "ststm32"
8
   ],
8
   ],
9
   "description": "CMSIS library for LPC1768",
9
   "description": "CMSIS library for LPC1768",

Loading…
Cancel
Save