mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-29 12:32:05 +08:00
Costmet clean, whitespace, carriage-return removal
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4274 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -356,7 +356,7 @@
|
||||
mtc0 k0, MIPS32_CP0_STATUS
|
||||
ehb
|
||||
mtc0 k1, MIPS32_CP0_EPC
|
||||
eret
|
||||
eret
|
||||
nop
|
||||
.endm
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs)
|
||||
*/
|
||||
|
||||
irq = ((regval) & INT_INTSTAT_VEC_MASK) >> INT_INTSTAT_VEC_SHIFT;
|
||||
|
||||
|
||||
/* Deliver the IRQ */
|
||||
|
||||
irq_dispatch(irq, regs);
|
||||
@@ -153,7 +153,7 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs)
|
||||
|
||||
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
|
||||
/* I think there are some task switching issues here. You should not
|
||||
* enable nested interrupts unless you are ready to deal with the
|
||||
* enable nested interrupts unless you are ready to deal with the
|
||||
* complexities of nested context switching. The logic here is probably
|
||||
* insufficient.
|
||||
*/
|
||||
|
||||
@@ -120,10 +120,10 @@ static inline unsigned int pic32mx_pinno(uint16_t pinset)
|
||||
* Description:
|
||||
* Configure a GPIO pin based on bit-encoded description of the pin (the
|
||||
* interrupt will be configured when pic32mx_attach() is called.
|
||||
*
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; negated errno on failure.
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int pic32mx_configgpio(uint16_t cfgset)
|
||||
|
||||
@@ -188,13 +188,13 @@ void pic32mx_gpioirqinitialize(void)
|
||||
* When an interrupt occurs, it is due to a change on the GPIO input pin.
|
||||
* In that case, all attached handlers will be called. Each handler must
|
||||
* maintain state and determine if the unlying GPIO input value changed.
|
||||
*
|
||||
*
|
||||
* Parameters:
|
||||
* - pinset: GPIO pin configuration
|
||||
* - cn: The change notification number associated with the pin.
|
||||
* - handler: Interrupt handler (may be NULL to detach)
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
* Returns:
|
||||
* The previous value of the interrupt handler function pointer. This
|
||||
* value may, for example, be used to restore the previous handler when
|
||||
* multiple handlers are used.
|
||||
@@ -228,7 +228,7 @@ xcpt_t pic32mx_gpioattach(uint32_t pinset, unsigned int cn, xcpt_t handler)
|
||||
pic32mx_configgpio(pinset);
|
||||
|
||||
/* Pull-up requested? */
|
||||
|
||||
|
||||
if (pic32mx_pullup(pinset))
|
||||
{
|
||||
putreg32(1 << cn, PIC32MX_IOPORT_CNPUESET);
|
||||
|
||||
@@ -158,7 +158,6 @@ __reset:
|
||||
nop
|
||||
.end __reset
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Name: _gen_exception
|
||||
*
|
||||
@@ -218,7 +217,7 @@ _ebase_exception:
|
||||
*
|
||||
* Description:
|
||||
* Boot Exception Vector Handler. Jumps to _exception_handler. This
|
||||
* vector will be positioned at 0xbfc00380 by the linker script.
|
||||
* vector will be positioned at 0xbfc00380 by the linker script.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
@@ -242,7 +241,7 @@ _bev_exception:
|
||||
*
|
||||
* Description:
|
||||
* Interrupt Exception Vector Handler. Jumps to _int_handler. This
|
||||
* vector will be positioned at 0xbfc00400 by the linker script.
|
||||
* vector will be positioned at 0xbfc00400 by the linker script.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
@@ -379,7 +378,7 @@ __start:
|
||||
la t1, _sramfunc
|
||||
la t2, _eramfunc
|
||||
|
||||
.Lramfuncloop:
|
||||
.Lramfuncloop:
|
||||
lw t3,(t0)
|
||||
sw t3,(t1)
|
||||
addu t0,4
|
||||
@@ -635,7 +634,7 @@ devconfig0:
|
||||
/* g_instackbase is a pointer to the final, aligned word of the interrupt
|
||||
* stack.
|
||||
*/
|
||||
|
||||
|
||||
.sdata
|
||||
.type g_intstackbase, object
|
||||
g_intstackbase:
|
||||
|
||||
@@ -247,10 +247,10 @@ EXTERN uint32_t *pic32mx_exception(uint32_t *regs);
|
||||
* Description:
|
||||
* Configure a GPIO pin based on bit-encoded description of the pin (the interrupt
|
||||
* will be configured when pic32mx_attach() is called).
|
||||
*
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; negated errno on failure.
|
||||
*
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
EXTERN int pic32mx_configgpio(uint16_t cfgset);
|
||||
@@ -303,13 +303,13 @@ EXTERN void pic32mx_gpioirqinitialize(void);
|
||||
* When an interrupt occurs, it is due to a change on the GPIO input pin. In that
|
||||
* case, all attached handlers will be called. Each handler must maintain state
|
||||
* and determine if the unlying GPIO input value changed.
|
||||
*
|
||||
*
|
||||
* Parameters:
|
||||
* - pinset: GPIO pin configuration
|
||||
* - cn: The change notification number associated with the pin
|
||||
* - handler: Interrupt handler (may be NULL to detach)
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
* Returns:
|
||||
* The previous value of the interrupt handler function pointer. This value may,
|
||||
* for example, be used to restore the previous handler when multiple handlers are
|
||||
* used.
|
||||
@@ -370,7 +370,7 @@ EXTERN void pic32mx_dumpgpio(uint32_t pinset, const char *msg);
|
||||
* Description:
|
||||
* These external functions must be provided by board-specific logic. They are
|
||||
* implementations of the select, status, and cmddata methods of the SPI interface
|
||||
* defined by struct spi_ops_s (see include/nuttx/spi.h). All other methods
|
||||
* defined by struct spi_ops_s (see include/nuttx/spi.h). All other methods
|
||||
* including up_spiinitialize()) are provided by common PIC32MX logic. To use
|
||||
* this common SPI logic on your board:
|
||||
*
|
||||
@@ -386,7 +386,7 @@ EXTERN void pic32mx_dumpgpio(uint32_t pinset, const char *msg);
|
||||
* 3. Add a call to up_spiinitialize() in your low level application
|
||||
* initialization logic
|
||||
* 4. The handle returned by up_spiinitialize() may then be used to bind the
|
||||
* SPI driver to higher level logic (e.g., calling
|
||||
* SPI driver to higher level logic (e.g., calling
|
||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||
* the SPI MMC/SD driver).
|
||||
*
|
||||
|
||||
@@ -127,7 +127,7 @@ void up_irqinitialize(void)
|
||||
/* Set the IV bit in the CAUSE register */
|
||||
|
||||
regval = cp0_getcause();
|
||||
regval |= CP0_CAUSE_IV;
|
||||
regval |= CP0_CAUSE_IV;
|
||||
cp0_putcause(regval);
|
||||
|
||||
/* Clear the EXL and BEV bits in the STATUS register */
|
||||
@@ -145,7 +145,7 @@ void up_irqinitialize(void)
|
||||
#endif
|
||||
|
||||
/* Initialize GPIO change notification handling */
|
||||
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
pic32mx_gpioirqinitialize();
|
||||
#endif
|
||||
|
||||
@@ -175,7 +175,7 @@ static void pic32mx_uartsetbaud(uintptr_t uart_base, uint32_t baudrate)
|
||||
/* We want the largest value of BRG divisor possible (for the best accuracy).
|
||||
* Subject to BRG <= 65536.
|
||||
*/
|
||||
|
||||
|
||||
tmp = BOARD_PBCLOCK / baudrate;
|
||||
|
||||
/* Try BRGH=1 first. This will select the 4x divisor and will produce the
|
||||
|
||||
@@ -115,9 +115,9 @@ static inline void pic32mx_waitstates(void)
|
||||
/* Disable DRM wait states */
|
||||
|
||||
putreg32(BMX_CON_BMXWSDRM, PIC32MX_BMX_CONCLR);
|
||||
|
||||
|
||||
/* Configure pre-fetch cache FLASH wait states */
|
||||
|
||||
|
||||
residual = BOARD_CPU_CLOCK;
|
||||
nwaits = 0;
|
||||
|
||||
@@ -153,7 +153,7 @@ static inline void pic32mx_cache(void)
|
||||
regval = getreg32(PIC32MX_CHE_CON);
|
||||
regval |= CHE_CON_PREFEN_ALL;
|
||||
putreg32(regval, PIC32MX_CHE_CON);
|
||||
|
||||
|
||||
/* Enable cache on KSEG 0 in the CP0 CONFIG register*/
|
||||
|
||||
asm("\tmfc0 %0,$16,0\n" : "=r"(regval));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -419,7 +419,7 @@ static int up_attach(struct uart_dev_s *dev)
|
||||
static void up_detach(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
|
||||
|
||||
/* Disable interrupts */
|
||||
|
||||
up_disableuartint(dev, NULL);
|
||||
@@ -478,8 +478,8 @@ static int up_interrupt(int irq, void *context)
|
||||
handled = false;
|
||||
|
||||
/* Handle error interrupts. This interrupt occurs when any of the
|
||||
* following error conditions take place:
|
||||
* - Parity error PERR (UxSTA bit 3) is detected
|
||||
* following error conditions take place:
|
||||
* - Parity error PERR (UxSTA bit 3) is detected
|
||||
* - Framing Error FERR (UxSTA bit 2) is detected
|
||||
* - Overflow condition for the receive buffer OERR (UxSTA bit 1) occurs
|
||||
*/
|
||||
@@ -544,7 +544,7 @@ static int up_interrupt(int irq, void *context)
|
||||
uart_xmitchars(dev);
|
||||
handled = true;
|
||||
|
||||
/* Clear the pending TX interrupt if the TX FIFO is empty.
|
||||
/* Clear the pending TX interrupt if the TX FIFO is empty.
|
||||
* Note that interrupts can be lost if the interrupt condition is
|
||||
* still true when the interrupt is cleared. Keeping the TX
|
||||
* interrupt pending too long is not a problem: Upper level logic
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
* TIMER1_PRESCALE = 64
|
||||
* TIMER1_MATCH = 9375 -> 100.0 ticks/sec
|
||||
*/
|
||||
|
||||
|
||||
#define OPTIMAL_PRESCALE (TIMER1_SRC_FREQ / CLOCKS_PER_SEC / 65535)
|
||||
#if OPTIMAL_PRESCALE <= 1
|
||||
# define TIMER1_CON_TCKPS TIMER1_CON_TCKPS_1
|
||||
@@ -148,7 +148,7 @@
|
||||
int up_timerisr(int irq, uint32_t *regs)
|
||||
{
|
||||
/* Clear the pending timer interrupt */
|
||||
|
||||
|
||||
putreg32(INT_T1, PIC32MX_INT_IFS0CLR);
|
||||
|
||||
/* Process timer interrupt */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user