nxp_fmuk66-v1:Port to NuttX 8.1+

This commit is contained in:
David Sidrane 2019-11-06 13:57:07 -08:00 committed by Lorenz Meier
parent 2faa2c5e19
commit 65a26ec060
12 changed files with 23 additions and 22 deletions

View File

@ -45,6 +45,3 @@ config BOARD_USE_PROBES
---help---
Select to use GPIO FMU-CH1-6 to provide timing signals from selected drivers.
endif

View File

@ -50,7 +50,7 @@ __BEGIN_DECLS
/* these headers are not C++ safe */
#include <kinetis.h>
#include <chip/kinetis_pinmux.h>
#include <hardware/kinetis_pinmux.h>
#include <arch/board/board.h>
/* FMUK66 GPIOs ***********************************************************************************/

View File

@ -63,7 +63,7 @@
#include <kinetis.h>
#include <kinetis_uart.h>
#include <chip/kinetis_uart.h>
#include <hardware/kinetis_uart.h>
#include "board_config.h"
#include "up_arch.h"

View File

@ -43,8 +43,8 @@
#include <stdint.h>
#include <kinetis.h>
#include "chip/kinetis_sim.h"
#include "chip/kinetis_ftm.h"
#include "hardware/kinetis_sim.h"
#include "hardware/kinetis_ftm.h"
#include <drivers/drv_pwm_output.h>
#include <px4_arch/io_timer.h>

View File

@ -38,8 +38,8 @@
#include <nuttx/analog/adc.h>
#include <kinetis.h>
#include <chip/kinetis_sim.h>
#include <chip/kinetis_adc.h>
#include <hardware/kinetis_sim.h>
#include <hardware/kinetis_adc.h>
#define _REG(_addr) (*(volatile uint32_t *)(_addr))
@ -146,7 +146,7 @@ void px4_arch_adc_uninit(uint32_t base_address)
px4_leave_critical_section(flags);
}
uint16_t px4_arch_adc_sample(uint32_t base_address, unsigned channel)
uint32_t px4_arch_adc_sample(uint32_t base_address, unsigned channel)
{
irqstate_t flags = px4_enter_critical_section();
@ -169,7 +169,7 @@ uint16_t px4_arch_adc_sample(uint32_t base_address, unsigned channel)
}
/* read the result and clear EOC */
uint16_t result = rRA(1);
uint32_t result = rRA(1);
px4_leave_critical_section(flags);
@ -181,3 +181,7 @@ uint32_t px4_arch_adc_temp_sensor_mask()
return 1 << (ADC_SC1_ADCH_TEMP >> ADC_SC1_ADCH_SHIFT);
}
uint32_t px4_arch_adc_dn_fullcount(void)
{
return 1 << 12; // 12 bit ADC
}

View File

@ -67,7 +67,7 @@
#include "kinetis.h"
#include "chip/kinetis_sim.h"
#include "hardware/kinetis_sim.h"
#include "kinetis_tpm.h"
#undef PPM_DEBUG

View File

@ -75,8 +75,8 @@
#include <px4_arch/io_timer.h>
#include <kinetis.h>
#include "chip/kinetis_sim.h"
#include "chip/kinetis_ftm.h"
#include "hardware/kinetis_sim.h"
#include "hardware/kinetis_ftm.h"
#define _REG(_addr) (*(volatile uint32_t *)(_addr))

View File

@ -59,8 +59,8 @@
#include <px4_arch/io_timer.h>
#include <kinetis.h>
#include "chip/kinetis_sim.h"
#include "chip/kinetis_ftm.h"
#include "hardware/kinetis_sim.h"
#include "hardware/kinetis_ftm.h"
/* The FTM pre-scalers are limited to Divide by 2^n where n={1-7}
* Therefore we use Y1 at 16 Mhz to drive FTM_CLKIN0 (PCT12)

View File

@ -59,8 +59,8 @@
#include <px4_arch/io_timer.h>
#include <kinetis.h>
#include "chip/kinetis_sim.h"
#include "chip/kinetis_ftm.h"
#include "hardware/kinetis_sim.h"
#include "hardware/kinetis_ftm.h"
#if defined(BOARD_HAS_LED_PWM) || defined(BOARD_HAS_UI_LED_PWM)

View File

@ -35,7 +35,7 @@
* @file ToneAlarmInterface.cpp
*/
#include "chip/kinetis_sim.h"
#include "hardware/kinetis_sim.h"
#include "kinetis_tpm.h"
#include <drivers/device/device.h>

View File

@ -41,8 +41,8 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <chip/kinetis_memorymap.h>
#include <chip/kinetis_sim.h>
#include <hardware/kinetis_memorymap.h>
#include <hardware/kinetis_sim.h>
static const uint16_t soc_arch_id = PX4_SOC_ARCH_ID;

View File

@ -41,7 +41,7 @@
#include <px4_platform_common/defines.h>
#include "up_arch.h"
#include "chip/kinetis_sim.h"
#include "hardware/kinetis_sim.h"
#define CHIP_TAG "Kinetis K??"
#define CHIP_TAG_LEN sizeof(CHIP_TAG)-1