mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
basic working port for soldercore with console over telnet
This commit is contained in:
parent
afeeac9cd7
commit
10a9cfc303
@ -372,8 +372,14 @@ static void spis_init()
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
#if defined( ELUA_BOARD_SOLDERCORE )
|
||||
GPIOPinConfigure( GPIO_PH4_SSI1CLK );
|
||||
GPIOPinConfigure( GPIO_PF4_SSI1RX );
|
||||
GPIOPinConfigure( GPIO_PF5_SSI1TX );
|
||||
#endif
|
||||
|
||||
for( i = 0; i < NUM_SPI; i ++ )
|
||||
MAP_SysCtlPeripheralEnable(spi_sysctl[ i ]);
|
||||
MAP_SysCtlPeripheralEnable( spi_sysctl[ i ] );
|
||||
}
|
||||
|
||||
u32 platform_spi_setup( unsigned id, int mode, u32 clock, unsigned cpol, unsigned cpha, unsigned databits )
|
||||
@ -387,16 +393,6 @@ u32 platform_spi_setup( unsigned id, int mode, u32 clock, unsigned cpol, unsigne
|
||||
mode = mode == PLATFORM_SPI_MASTER ? SSI_MODE_MASTER : SSI_MODE_SLAVE;
|
||||
MAP_SSIDisable( spi_base[ id ] );
|
||||
|
||||
#if defined( ELUA_BOARD_SOLDERCORE )
|
||||
if( id == 1 )
|
||||
{
|
||||
GPIOPinConfigure( GPIO_PH4_SSI1CLK );
|
||||
GPIOPinConfigure( GPIO_PF4_SSI1RX );
|
||||
GPIOPinConfigure( GPIO_PF5_SSI1TX );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
MAP_GPIOPinTypeSSI( spi_gpio_base[ id ], spi_gpio_pins[ id ] );
|
||||
MAP_GPIOPinTypeSSI( spi_gpio_clk_base[ id ], spi_gpio_clk_pin[ id ] );
|
||||
|
||||
@ -773,18 +769,18 @@ static void adcs_init()
|
||||
unsigned id;
|
||||
elua_adc_dev_state *d = adc_get_dev_state( 0 );
|
||||
|
||||
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC);
|
||||
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC);
|
||||
|
||||
// Try ramping up max sampling rate
|
||||
MAP_SysCtlADCSpeedSet(SYSCTL_ADCSPEED_500KSPS);
|
||||
MAP_SysCtlADCSpeedSet(SYSCTL_ADCSPEED_1MSPS);
|
||||
|
||||
for( id = 0; id < NUM_ADC; id ++ )
|
||||
for( id = 0; id < NUM_ADC; id ++ )
|
||||
adc_init_ch_state( id );
|
||||
|
||||
// Perform sequencer setup
|
||||
platform_adc_setclock( 0, 0 );
|
||||
MAP_ADCIntEnable( ADC_BASE, d->seq_id );
|
||||
MAP_ADCIntEnable( ADC_BASE, d->seq_id );
|
||||
MAP_IntEnable( adc_ints[ d->seq_id ] );
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#define BUILD_SHELL
|
||||
#define BUILD_ROMFS
|
||||
//#define BUILD_MMCFS
|
||||
#define BUILD_MMCFS
|
||||
|
||||
#ifndef FORLM3S1968
|
||||
#define BUILD_UIP
|
||||
@ -158,11 +158,15 @@
|
||||
#if defined(FORLM3S1968)
|
||||
#define NUM_PIO 8
|
||||
#elif defined(FORLM3S9B92) || defined( FORLM3S9D92 )
|
||||
#define NUM_PIO 7
|
||||
#define NUM_PIO 9
|
||||
#else
|
||||
#define NUM_PIO 7
|
||||
#endif
|
||||
#define NUM_SPI 1
|
||||
#if defined( FORLM3S9B92 ) || defined( FORLM3S9D92 )
|
||||
#define NUM_SPI 2
|
||||
#else
|
||||
#define NUM_SPI 1
|
||||
#endif
|
||||
#if defined( FORLM3S6965 )
|
||||
#define NUM_UART 3
|
||||
#elif defined( FORLM3S9B92 ) || defined( FORLM3S9D92 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user