Kconfig: generate xxx_ENABLED defines automatically.
This commit is contained in:
@@ -40,14 +40,12 @@ config unix root on sd0a
|
|||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart3
|
device uart3
|
||||||
options "UART3_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Console options
|
# Console options
|
||||||
options "CONSOLE_DEVICE=tty2" # /dev/tty2
|
options "CONSOLE_DEVICE=tty2" # /dev/tty2
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi4 # SD card
|
controller spi4 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# sdcard's definition for the SPI port, sdcard's chipselect and high-side power switch
|
# sdcard's definition for the SPI port, sdcard's chipselect and high-side power switch
|
||||||
# because of a mod on the board we use power=B13, otherwise it shall be D12
|
# because of a mod on the board we use power=B13, otherwise it shall be D12
|
||||||
@@ -61,19 +59,15 @@ options "SD0_ENA_PIN=13" # ...use pin RB13 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Use SDRAM driver for the external ramdisk
|
# Use SDRAM driver for the external ramdisk
|
||||||
disk sdramp0 # SDRAM on external memory bus
|
disk sdramp0 # SDRAM on external memory bus
|
||||||
options "SDRAMP_ENABLED" # TODO: delete this option
|
|
||||||
options "KERNEL_EXECUTABLE_RAM" # allow kernel code in RAM area
|
options "KERNEL_EXECUTABLE_RAM" # allow kernel code in RAM area
|
||||||
|
|
||||||
# This defines the swap size and a fs partition size on the external ramdisk.
|
# This defines the swap size and a fs partition size on the external ramdisk.
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
PARAM = -DCUSTOM_32MXSDRAM
|
PARAM = -DCUSTOM_32MXSDRAM
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
|
PARAM += -DUART3_ENABLED
|
||||||
|
PARAM += -DSPI4_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
|
PARAM += -DSDRAMP_ENABLED
|
||||||
PARAM += -DNMOUNT=3
|
PARAM += -DNMOUNT=3
|
||||||
PARAM += -DPARTITION='sdramp0:sa@2048,fs@14000'
|
PARAM += -DPARTITION='sdramp0:sa@2048,fs@14000'
|
||||||
PARAM += -DKERNEL_EXECUTABLE_RAM
|
PARAM += -DKERNEL_EXECUTABLE_RAM
|
||||||
PARAM += -DSDRAMP_ENABLED
|
|
||||||
PARAM += -DPWM_ENABLED
|
|
||||||
PARAM += -DADC_ENABLED
|
|
||||||
PARAM += -DGPIO_ENABLED
|
|
||||||
PARAM += -DSD0_ENA_PIN=13
|
PARAM += -DSD0_ENA_PIN=13
|
||||||
PARAM += -DSD0_ENA_PORT=TRISB
|
PARAM += -DSD0_ENA_PORT=TRISB
|
||||||
PARAM += -DSD0_CS_PIN=3
|
PARAM += -DSD0_CS_PIN=3
|
||||||
PARAM += -DSD0_CS_PORT=TRISF
|
PARAM += -DSD0_CS_PORT=TRISF
|
||||||
PARAM += -DSD0_PORT=4
|
PARAM += -DSD0_PORT=4
|
||||||
PARAM += -DSD0_MHZ=10
|
PARAM += -DSD0_MHZ=10
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=tty2
|
PARAM += -DCONSOLE_DEVICE=tty2
|
||||||
PARAM += -DUART3_ENABLED
|
|
||||||
PARAM += -DLED_TTY_PIN=14
|
PARAM += -DLED_TTY_PIN=14
|
||||||
PARAM += -DLED_TTY_PORT=TRISA
|
PARAM += -DLED_TTY_PORT=TRISA
|
||||||
PARAM += -DLED_SWAP_PIN=14
|
PARAM += -DLED_SWAP_PIN=14
|
||||||
|
|||||||
@@ -63,10 +63,6 @@ device uart1 # Serial-to-USB converter
|
|||||||
device uart2
|
device uart2
|
||||||
device uart3
|
device uart3
|
||||||
device uart4
|
device uart4
|
||||||
options "UART1_ENABLED" # TODO: delete this option
|
|
||||||
options "UART2_ENABLED" # TODO: delete this option
|
|
||||||
options "UART3_ENABLED" # TODO: delete this option
|
|
||||||
options "UART4_ENABLED" # TODO: delete this option
|
|
||||||
options "UART1_BAUD=115200" # default speed
|
options "UART1_BAUD=115200" # default speed
|
||||||
options "UART2_BAUD=115200" # default speed
|
options "UART2_BAUD=115200" # default speed
|
||||||
options "UART3_BAUD=115200" # default speed
|
options "UART3_BAUD=115200" # default speed
|
||||||
@@ -78,7 +74,6 @@ options "UART4_ENA_PIN=13" # ...use pin RB13
|
|||||||
device uartusb # USB device mode, CDC function
|
device uartusb # USB device mode, CDC function
|
||||||
options "UARTUSB_BAUD=115200" # default speed
|
options "UARTUSB_BAUD=115200" # default speed
|
||||||
options "USB_AUTOBOOT=YES" # don't wait for <Enter> on boot
|
options "USB_AUTOBOOT=YES" # don't wait for <Enter> on boot
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3" # parameters of USB device...
|
options "USB_MAX_EP_NUMBER=3" # parameters of USB device...
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3" # ...specific for CDC function
|
options "USB_NUM_STRING_DESCRIPTORS=3" # ...specific for CDC function
|
||||||
|
|
||||||
@@ -89,7 +84,6 @@ options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
|||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi2 flags 0x3e # select pin RC14
|
disk sd0 at spi2 flags 0x3e # select pin RC14
|
||||||
@@ -102,41 +96,32 @@ options "SD0_ENA_PIN=5" # ...use pin RA5
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
options "GPIO_CLEAR_PORT=TRISA" # clear on startup...
|
options "GPIO_CLEAR_PORT=TRISA" # clear on startup...
|
||||||
options "GPIO_CLEAR_PIN=5" # ...pin RA5
|
options "GPIO_CLEAR_PIN=5" # ...pin RA5
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# GLCD driver
|
# GLCD driver
|
||||||
device glcd
|
device glcd
|
||||||
options "GLCD_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# HX8357 driver
|
# HX8357 driver
|
||||||
device hxtft
|
device hxtft
|
||||||
options "HX8357_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Skeleton driver
|
# Skeleton driver
|
||||||
device skel0
|
device skel0
|
||||||
options "SKEL_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Pseudo terminals
|
# Pseudo terminals
|
||||||
pseudo-device pty 4
|
pseudo-device pty 4
|
||||||
options "PTY_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# System log
|
# System log
|
||||||
pseudo-device log
|
pseudo-device log
|
||||||
options "LOG_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Power control
|
# Power control
|
||||||
pseudo-device power
|
pseudo-device power
|
||||||
options "POWER_ENABLED" # TODO: delete this option
|
|
||||||
options "POWER_LED_PORT=TRISA" # for power LED...
|
options "POWER_LED_PORT=TRISA" # for power LED...
|
||||||
options "POWER_LED_PIN=3" # ...use pin RA3
|
options "POWER_LED_PIN=3" # ...use pin RA3
|
||||||
options "POWER_SWITCH_PORT=TRISA" # for power switch...
|
options "POWER_SWITCH_PORT=TRISA" # for power switch...
|
||||||
@@ -150,12 +135,10 @@ options "POWER_CONTROL_PIN=5" # ...use pin RA5
|
|||||||
|
|
||||||
# sdramp - SDRAM block device
|
# sdramp - SDRAM block device
|
||||||
disk sdramp0 # SDRAM on external memory bus
|
disk sdramp0 # SDRAM on external memory bus
|
||||||
options "SDRAMP_ENABLED" # TODO: delete this option
|
|
||||||
options "KERNEL_EXECUTABLE_RAM" # allow kernel code in RAM area
|
options "KERNEL_EXECUTABLE_RAM" # allow kernel code in RAM area
|
||||||
|
|
||||||
# sramc - SRAM block device
|
# sramc - SRAM block device
|
||||||
disk sramc0 # SRAM via 4-wire CPLD interface
|
disk sramc0 # SRAM via 4-wire CPLD interface
|
||||||
options "SRAMC_ENABLED" # TODO: delete this option
|
|
||||||
options "SRAMC_DATA_PORT=TRISE" # for DATA signal...
|
options "SRAMC_DATA_PORT=TRISE" # for DATA signal...
|
||||||
options "SRAMC_DATA_PIN=0" # ...use pin RE0
|
options "SRAMC_DATA_PIN=0" # ...use pin RE0
|
||||||
options "SRAMC_LDA_PORT=TRISC" # for LDA signal...
|
options "SRAMC_LDA_PORT=TRISC" # for LDA signal...
|
||||||
@@ -168,7 +151,6 @@ options "SRAMC_WR_PIN=0" # ...use pin RF0
|
|||||||
# picga - SPI block device
|
# picga - SPI block device
|
||||||
controller spi1 # RAM disk: picga
|
controller spi1 # RAM disk: picga
|
||||||
disk picga0 at spi1
|
disk picga0 at spi1
|
||||||
options "PICGA_ENABLED" # TODO: delete this option
|
|
||||||
options "PICGA_BUS=SPI1CON" # TODO: delete this option
|
options "PICGA_BUS=SPI1CON" # TODO: delete this option
|
||||||
options "PICGA_CS_PORT=TRISA" # for CS...
|
options "PICGA_CS_PORT=TRISA" # for CS...
|
||||||
options "PICGA_CS_PIN=4" # ...use pin RA4
|
options "PICGA_CS_PIN=4" # ...use pin RA4
|
||||||
@@ -176,7 +158,6 @@ options "PICGA_CS_PIN=4" # ...use pin RA4
|
|||||||
# mrams - SPI block device
|
# mrams - SPI block device
|
||||||
controller spi1 # RAM disk: mrams
|
controller spi1 # RAM disk: mrams
|
||||||
disk mrams0 at spi1
|
disk mrams0 at spi1
|
||||||
options "MRAMS_ENABLED" # TODO: delete this option
|
|
||||||
options "MRAMS_PORT=SPI1CON" # TODO: delete this option
|
options "MRAMS_PORT=SPI1CON" # TODO: delete this option
|
||||||
options "MRAMS_CHIPS=6" # number of chips
|
options "MRAMS_CHIPS=6" # number of chips
|
||||||
options "MRAMS_CHIPSIZE=512" # chip size in kbytes
|
options "MRAMS_CHIPSIZE=512" # chip size in kbytes
|
||||||
@@ -209,7 +190,6 @@ options "MRAMS_LED5_PIN=5" # ...use pin RF5
|
|||||||
# spirams - SPI block device
|
# spirams - SPI block device
|
||||||
controller spi1 # RAM disk: spirams
|
controller spi1 # RAM disk: spirams
|
||||||
disk spirams0 at spi1
|
disk spirams0 at spi1
|
||||||
options "SPIRAMS_ENABLED" # TODO: delete this option
|
|
||||||
options "SPIRAMS_PORT=SPI1CON" # TODO: delete this option
|
options "SPIRAMS_PORT=SPI1CON" # TODO: delete this option
|
||||||
options "SPIRAMS_CHIPSIZE=128" # chip size in kbytes
|
options "SPIRAMS_CHIPSIZE=128" # chip size in kbytes
|
||||||
options "SPIRAMS_CHIPS=16" # number of chips
|
options "SPIRAMS_CHIPS=16" # number of chips
|
||||||
|
|||||||
@@ -36,14 +36,12 @@ config unix root on sd0a
|
|||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart1
|
device uart1
|
||||||
options "UART1_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Console options
|
# Console options
|
||||||
options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# SD card
|
# SD card
|
||||||
disk sd0 at spi2 flags 0x41 # select pin RD1
|
disk sd0 at spi2 flags 0x41 # select pin RD1
|
||||||
@@ -54,12 +52,9 @@ options "SD0_CS_PIN=1" # ...use pin RD1 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
PARAM = -DBAREMETAL
|
PARAM = -DBAREMETAL
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUART1_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI2_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=1
|
PARAM += -DSD0_CS_PIN=1
|
||||||
PARAM += -DSD0_CS_PORT=TRISD
|
PARAM += -DSD0_CS_PORT=TRISD
|
||||||
PARAM += -DSD0_PORT=2
|
PARAM += -DSD0_PORT=2
|
||||||
PARAM += -DSD0_MHZ=16
|
PARAM += -DSD0_MHZ=16
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=tty0
|
PARAM += -DCONSOLE_DEVICE=tty0
|
||||||
PARAM += -DUART1_ENABLED
|
|
||||||
PARAM += -DLED_TTY_PIN=12
|
PARAM += -DLED_TTY_PIN=12
|
||||||
PARAM += -DLED_TTY_PORT=TRISD
|
PARAM += -DLED_TTY_PORT=TRISD
|
||||||
PARAM += -DLED_DISK_PIN=2
|
PARAM += -DLED_DISK_PIN=2
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include <sys/rdisk.h>
|
#include <sys/rdisk.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/uart.h>
|
#include <sys/uart.h>
|
||||||
|
#include <sys/spi.h>
|
||||||
|
|
||||||
#include <sys/swap.h>
|
#include <sys/swap.h>
|
||||||
|
|
||||||
@@ -31,9 +32,6 @@ extern int strcmp(char *s1, char *s2);
|
|||||||
#ifdef ADC_ENABLED
|
#ifdef ADC_ENABLED
|
||||||
# include <sys/adc.h>
|
# include <sys/adc.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef SPI_ENABLED
|
|
||||||
# include <sys/spi.h>
|
|
||||||
#endif
|
|
||||||
#ifdef GLCD_ENABLED
|
#ifdef GLCD_ENABLED
|
||||||
# include <sys/glcd.h>
|
# include <sys/glcd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -215,7 +213,8 @@ const struct cdevsw cdevsw[] = {
|
|||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
{ /* 12 - spi */
|
{ /* 12 - spi */
|
||||||
#ifdef SPI_ENABLED
|
#if defined(SPI1_ENABLED) || defined(SPI2_ENABLED) || \
|
||||||
|
defined(SPI3_ENABLED) || defined(SPI4_ENABLED)
|
||||||
spidev_open, spidev_close, spidev_read, spidev_write,
|
spidev_open, spidev_close, spidev_read, spidev_write,
|
||||||
spidev_ioctl, nulldev, 0, seltrue,
|
spidev_ioctl, nulldev, 0, seltrue,
|
||||||
nostrategy, 0, 0, spidevs
|
nostrategy, 0, 0, spidevs
|
||||||
|
|||||||
@@ -39,13 +39,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi3 # SD card
|
controller spi3 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi3 flags 0x7c # select pin RG12
|
disk sd0 at spi3 flags 0x7c # select pin RG12
|
||||||
@@ -57,12 +55,9 @@ options "SD0_ENA_PIN=13" # ...use pin RG13 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -39,13 +39,11 @@ options "CONSOLE_DEVICE=tty4" # Console on UART5
|
|||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart5 # RS-232 port
|
device uart5 # RS-232 port
|
||||||
options "UART5_ENABLED" # TODO: delete this option
|
|
||||||
options "UART5_ENA_PORT=TRISB" # for RS-232 enable... TODO: use flags
|
options "UART5_ENA_PORT=TRISB" # for RS-232 enable... TODO: use flags
|
||||||
options "UART5_ENA_PIN=13" # ...use pin RB13 TODO: use flags
|
options "UART5_ENA_PIN=13" # ...use pin RB13 TODO: use flags
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi3 # SD card
|
controller spi3 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi3 flags 0x7c # select pin RG12
|
disk sd0 at spi3 flags 0x7c # select pin RG12
|
||||||
@@ -57,12 +55,9 @@ options "SD0_ENA_PIN=13" # ...use pin RG13 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
PARAM = -DDUINOMITE
|
PARAM = -DDUINOMITE
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI3_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_ENA_PIN=13
|
PARAM += -DSD0_ENA_PIN=13
|
||||||
PARAM += -DSD0_ENA_PORT=TRISG
|
PARAM += -DSD0_ENA_PORT=TRISG
|
||||||
PARAM += -DSD0_CS_PIN=12
|
PARAM += -DSD0_CS_PIN=12
|
||||||
PARAM += -DSD0_CS_PORT=TRISG
|
PARAM += -DSD0_CS_PORT=TRISG
|
||||||
PARAM += -DSD0_PORT=3
|
PARAM += -DSD0_PORT=3
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_DISK_PIN=1
|
PARAM += -DLED_DISK_PIN=1
|
||||||
PARAM += -DLED_DISK_PORT=TRISC
|
PARAM += -DLED_DISK_PORT=TRISC
|
||||||
|
|||||||
@@ -38,13 +38,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi3 # SD card
|
controller spi3 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi3 flags 0x45 # select pin RD5
|
disk sd0 at spi3 flags 0x45 # select pin RD5
|
||||||
@@ -56,12 +54,9 @@ options "SD0_ENA_PIN=13" # ...use pin RB13 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -38,13 +38,11 @@ options "CONSOLE_DEVICE=tty4" # Console on UART5
|
|||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart5 # RS-232 port
|
device uart5 # RS-232 port
|
||||||
options "UART5_ENABLED" # TODO: delete this option
|
|
||||||
options "UART5_ENA_PORT=TRISB" # for RS-232 enable... TODO: use flags
|
options "UART5_ENA_PORT=TRISB" # for RS-232 enable... TODO: use flags
|
||||||
options "UART5_ENA_PIN=13" # ...use pin RB13 TODO: use flags
|
options "UART5_ENA_PIN=13" # ...use pin RB13 TODO: use flags
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi3 # SD card
|
controller spi3 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi3 flags 0x45 # select pin RD5
|
disk sd0 at spi3 flags 0x45 # select pin RD5
|
||||||
@@ -56,12 +54,9 @@ options "SD0_ENA_PIN=13" # ...use pin RB13 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
PARAM = -DDUINOMITE
|
PARAM = -DDUINOMITE
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI3_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_ENA_PIN=13
|
PARAM += -DSD0_ENA_PIN=13
|
||||||
PARAM += -DSD0_ENA_PORT=TRISB
|
PARAM += -DSD0_ENA_PORT=TRISB
|
||||||
PARAM += -DSD0_CS_PIN=5
|
PARAM += -DSD0_CS_PIN=5
|
||||||
PARAM += -DSD0_CS_PORT=TRISD
|
PARAM += -DSD0_CS_PORT=TRISD
|
||||||
PARAM += -DSD0_PORT=3
|
PARAM += -DSD0_PORT=3
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_DISK_PIN=12
|
PARAM += -DLED_DISK_PIN=12
|
||||||
PARAM += -DLED_DISK_PORT=TRISB
|
PARAM += -DLED_DISK_PORT=TRISB
|
||||||
|
|||||||
@@ -38,14 +38,12 @@ config unix root on sd0a
|
|||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart2
|
device uart2
|
||||||
options "UART2_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Console options
|
# Console options
|
||||||
options "CONSOLE_DEVICE=tty1" # /dev/tty1
|
options "CONSOLE_DEVICE=tty1" # /dev/tty1
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi1 # SD card
|
controller spi1 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# SD card
|
# SD card
|
||||||
disk sd0 at spi1 flags 0x21 # select pin RB1
|
disk sd0 at spi1 flags 0x21 # select pin RB1
|
||||||
@@ -56,12 +54,9 @@ options "SD0_CS_PIN=1" # ...use pin RB1 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
PARAM = -DEXPLORER16
|
PARAM = -DEXPLORER16
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUART2_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI1_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=1
|
PARAM += -DSD0_CS_PIN=1
|
||||||
PARAM += -DSD0_CS_PORT=TRISB
|
PARAM += -DSD0_CS_PORT=TRISB
|
||||||
PARAM += -DSD0_PORT=1
|
PARAM += -DSD0_PORT=1
|
||||||
PARAM += -DSD0_MHZ=10
|
PARAM += -DSD0_MHZ=10
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=tty1
|
PARAM += -DCONSOLE_DEVICE=tty1
|
||||||
PARAM += -DUART2_ENABLED
|
|
||||||
PARAM += -DLED_SWAP_PIN=3
|
PARAM += -DLED_SWAP_PIN=3
|
||||||
PARAM += -DLED_SWAP_PORT=TRISA
|
PARAM += -DLED_SWAP_PORT=TRISA
|
||||||
PARAM += -DLED_TTY_PIN=2
|
PARAM += -DLED_TTY_PIN=2
|
||||||
|
|||||||
@@ -36,13 +36,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi2 flags 0x79 # select pin RG9
|
disk sd0 at spi2 flags 0x79 # select pin RG9
|
||||||
@@ -52,16 +50,12 @@ options "SD0_CS_PIN=9" # ...use pin RA9 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# GLCD driver
|
# GLCD driver
|
||||||
device glcd0
|
device glcd0
|
||||||
options "GLCD_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -42,12 +42,9 @@ options "CONSOLE_DEVICE=tty1" # Console on UART2
|
|||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart1 # Additional serial port
|
device uart1 # Additional serial port
|
||||||
device uart2 # Console
|
device uart2 # Console
|
||||||
options "UART1_ENABLED" # TODO: delete this option
|
|
||||||
options "UART2_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi2 flags 0x79 # select pin RG9
|
disk sd0 at spi2 flags 0x79 # select pin RG9
|
||||||
@@ -58,17 +55,13 @@ options "SD0_MHZ=20" # increase data speed
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# sramc - SRAM block device
|
# sramc - SRAM block device
|
||||||
disk sramc0 # SRAM via 4-wire CPLD interface
|
disk sramc0 # SRAM via 4-wire CPLD interface
|
||||||
options "SRAMC_ENABLED" # TODO: delete this option
|
|
||||||
options "PARTITION='sramc0:sa@2048,fs@6140'" # Partition schema
|
options "PARTITION='sramc0:sa@2048,fs@6140'" # Partition schema
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
PARAM = -DFUBARINO
|
PARAM = -DFUBARINO
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DGLCD_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DSPI2_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
|
PARAM += -DGLCD_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=9
|
PARAM += -DSD0_CS_PIN=9
|
||||||
PARAM += -DSD0_CS_PORT=TRISG
|
PARAM += -DSD0_CS_PORT=TRISG
|
||||||
PARAM += -DSD0_PORT=2
|
PARAM += -DSD0_PORT=2
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_KERNEL_PIN=5
|
PARAM += -DLED_KERNEL_PIN=5
|
||||||
PARAM += -DLED_KERNEL_PORT=TRISE
|
PARAM += -DLED_KERNEL_PORT=TRISE
|
||||||
|
|||||||
@@ -35,17 +35,12 @@ device uart1 # Serial-to-USB converter
|
|||||||
device uart2
|
device uart2
|
||||||
device uart3
|
device uart3
|
||||||
device uart4
|
device uart4
|
||||||
options "UART1_ENABLED" # TODO: delete this option
|
|
||||||
options "UART2_ENABLED" # TODO: delete this option
|
|
||||||
options "UART3_ENABLED" # TODO: delete this option
|
|
||||||
options "UART4_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Console options
|
# Console options
|
||||||
options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi2 flags 0x3e # select pin RC14
|
disk sd0 at spi2 flags 0x3e # select pin RC14
|
||||||
@@ -56,16 +51,12 @@ options "SD0_CS_PIN=14" # ...use pin RC14 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Skeleton driver
|
# Skeleton driver
|
||||||
#device skel0
|
#device skel0
|
||||||
#options "SKEL_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
PARAM = -DMAX32
|
PARAM = -DMAX32
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUART1_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DUART2_ENABLED
|
||||||
|
PARAM += -DUART3_ENABLED
|
||||||
|
PARAM += -DUART4_ENABLED
|
||||||
|
PARAM += -DSPI2_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=14
|
PARAM += -DSD0_CS_PIN=14
|
||||||
PARAM += -DSD0_CS_PORT=TRISC
|
PARAM += -DSD0_CS_PORT=TRISC
|
||||||
PARAM += -DSD0_PORT=2
|
PARAM += -DSD0_PORT=2
|
||||||
PARAM += -DSD0_MHZ=10
|
PARAM += -DSD0_MHZ=10
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=tty0
|
PARAM += -DCONSOLE_DEVICE=tty0
|
||||||
PARAM += -DUART4_ENABLED
|
|
||||||
PARAM += -DUART3_ENABLED
|
|
||||||
PARAM += -DUART2_ENABLED
|
|
||||||
PARAM += -DUART1_ENABLED
|
|
||||||
PARAM += -DLED_KERNEL_PIN=3
|
PARAM += -DLED_KERNEL_PIN=3
|
||||||
PARAM += -DLED_KERNEL_PORT=TRISA
|
PARAM += -DLED_KERNEL_PORT=TRISA
|
||||||
PARAM += -DBUS_DIV=1
|
PARAM += -DBUS_DIV=1
|
||||||
|
|||||||
@@ -38,13 +38,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi4 # SD card
|
controller spi4 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi4 flags 0x11 # select pin RA1
|
disk sd0 at spi4 flags 0x11 # select pin RA1
|
||||||
@@ -54,12 +52,9 @@ options "SD0_CS_PIN=1" # ...use pin RA1 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
PARAM = -DMAXIMITE_COLOR
|
PARAM = -DMAXIMITE_COLOR
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI4_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=1
|
PARAM += -DSD0_CS_PIN=1
|
||||||
PARAM += -DSD0_CS_PORT=TRISA
|
PARAM += -DSD0_CS_PORT=TRISA
|
||||||
PARAM += -DSD0_PORT=4
|
PARAM += -DSD0_PORT=4
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_DISK_PIN=1
|
PARAM += -DLED_DISK_PIN=1
|
||||||
PARAM += -DLED_DISK_PORT=TRISE
|
PARAM += -DLED_DISK_PORT=TRISE
|
||||||
|
|||||||
@@ -39,13 +39,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi4 # SD card
|
controller spi4 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi4 flags 0x50 # select pin RE0
|
disk sd0 at spi4 flags 0x50 # select pin RE0
|
||||||
@@ -55,12 +53,9 @@ options "SD0_CS_PIN=0" # ...use pin RE0 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
PARAM = -DMAXIMITE
|
PARAM = -DMAXIMITE
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI4_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=0
|
PARAM += -DSD0_CS_PIN=0
|
||||||
PARAM += -DSD0_CS_PORT=TRISE
|
PARAM += -DSD0_CS_PORT=TRISE
|
||||||
PARAM += -DSD0_PORT=4
|
PARAM += -DSD0_PORT=4
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_DISK_PIN=1
|
PARAM += -DLED_DISK_PIN=1
|
||||||
PARAM += -DLED_DISK_PORT=TRISE
|
PARAM += -DLED_DISK_PORT=TRISE
|
||||||
|
|||||||
@@ -42,17 +42,14 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart1 # RS-232 port
|
device uart1 # RS-232 port
|
||||||
options "UART1_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi1 # SD card
|
controller spi1 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi1 flags 0x19 # select pin RA9
|
disk sd0 at spi1 flags 0x19 # select pin RA9
|
||||||
@@ -63,14 +60,11 @@ options "SD0_CS_PIN=9" # ...use pin RA9 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
options "GPIO_CLEAR_PORT=TRISD" # clear on startup...
|
options "GPIO_CLEAR_PORT=TRISD" # clear on startup...
|
||||||
options "GPIO_CLEAR_PIN=2" # ...pin RD2
|
options "GPIO_CLEAR_PIN=2" # ...pin RD2
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
PARAM = -DMMB_MX7
|
PARAM = -DMMB_MX7
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
|
PARAM += -DUART1_ENABLED
|
||||||
|
PARAM += -DSPI1_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
|
PARAM += -DGPIO_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DGPIO_CLEAR_PIN=2
|
PARAM += -DGPIO_CLEAR_PIN=2
|
||||||
PARAM += -DGPIO_CLEAR_PORT=TRISD
|
PARAM += -DGPIO_CLEAR_PORT=TRISD
|
||||||
PARAM += -DGPIO_ENABLED
|
|
||||||
PARAM += -DSD0_CS_PIN=9
|
PARAM += -DSD0_CS_PIN=9
|
||||||
PARAM += -DSD0_CS_PORT=TRISA
|
PARAM += -DSD0_CS_PORT=TRISA
|
||||||
PARAM += -DSD0_MHZ=8
|
PARAM += -DSD0_MHZ=8
|
||||||
PARAM += -DSD0_PORT=1
|
PARAM += -DSD0_PORT=1
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUART1_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_TTY_INVERT
|
PARAM += -DLED_TTY_INVERT
|
||||||
PARAM += -DLED_TTY_PIN=1
|
PARAM += -DLED_TTY_PIN=1
|
||||||
|
|||||||
@@ -29,14 +29,12 @@ config unix root on sd0a
|
|||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart1 # Serial-to-USB converter
|
device uart1 # Serial-to-USB converter
|
||||||
options "UART1_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Console options
|
# Console options
|
||||||
options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi2 flags 0x79 # select pin RG9
|
disk sd0 at spi2 flags 0x79 # select pin RG9
|
||||||
@@ -47,16 +45,12 @@ options "SD0_CS_PIN=9" # ...use pin RG9 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# HX8357 TFT display driver
|
# HX8357 TFT display driver
|
||||||
device hxtft0
|
device hxtft0
|
||||||
options "HX8357_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ config unix root on sd0a
|
|||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart1 # Serial-to-USB converter
|
device uart1 # Serial-to-USB converter
|
||||||
options "UART1_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Console options
|
# Console options
|
||||||
options "CONSOLE_DEVICE=tft0" # LCD screen
|
options "CONSOLE_DEVICE=tft0" # LCD screen
|
||||||
@@ -37,7 +36,6 @@ options "CONSOLE_DEVICE=tft0" # LCD screen
|
|||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
controller spi4 # RAM disk: spirams
|
controller spi4 # RAM disk: spirams
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi2 flags 0x79 # select pin RG9
|
disk sd0 at spi2 flags 0x79 # select pin RG9
|
||||||
@@ -48,24 +46,19 @@ options "SD0_CS_PIN=9" # ...use pin RG9 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# HX8357 TFT display driver
|
# HX8357 TFT display driver
|
||||||
device hxtft0
|
device hxtft0
|
||||||
options "HX8357_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# spirams - SPI block device
|
# spirams - SPI block device
|
||||||
disk spirams0 at spi4
|
disk spirams0 at spi4
|
||||||
options "PARTITION='spirams0:sa@2040'" # Partition schema
|
options "PARTITION='spirams0:sa@2040'" # Partition schema
|
||||||
options "SPIRAMS_ENABLED" # TODO: delete this option
|
|
||||||
options "SPIRAMS_PORT=SPI4CON" # TODO: delete this option
|
options "SPIRAMS_PORT=SPI4CON" # TODO: delete this option
|
||||||
options "SPIRAMS_CHIPSIZE=128" # chip size in kbytes
|
options "SPIRAMS_CHIPSIZE=128" # chip size in kbytes
|
||||||
options "SPIRAMS_CHIPS=16" # number of chips
|
options "SPIRAMS_CHIPS=16" # number of chips
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
PARAM = -DPICADILLO_35T
|
PARAM = -DPICADILLO_35T
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DHX8357_ENABLED
|
PARAM += -DUART1_ENABLED
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DSPI2_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
|
PARAM += -DHXTFT_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=9
|
PARAM += -DSD0_CS_PIN=9
|
||||||
PARAM += -DSD0_CS_PORT=TRISG
|
PARAM += -DSD0_CS_PORT=TRISG
|
||||||
PARAM += -DSD0_PORT=2
|
PARAM += -DSD0_PORT=2
|
||||||
PARAM += -DSD0_MHZ=10
|
PARAM += -DSD0_MHZ=10
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=tty0
|
PARAM += -DCONSOLE_DEVICE=tty0
|
||||||
PARAM += -DUART1_ENABLED
|
|
||||||
PARAM += -DBUS_DIV=1
|
PARAM += -DBUS_DIV=1
|
||||||
PARAM += -DBUS_KHZ=80000
|
PARAM += -DBUS_KHZ=80000
|
||||||
PARAM += -DCPU_KHZ=80000
|
PARAM += -DCPU_KHZ=80000
|
||||||
|
|||||||
@@ -36,13 +36,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi2 flags 0x2d # select pin RB13
|
disk sd0 at spi2 flags 0x2d # select pin RB13
|
||||||
@@ -52,12 +50,9 @@ options "SD0_CS_PIN=13" # ...use pin RB13 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
PARAM = -DPINGUINO_MICRO
|
PARAM = -DPINGUINO_MICRO
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI2_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=13
|
PARAM += -DSD0_CS_PIN=13
|
||||||
PARAM += -DSD0_CS_PORT=TRISB
|
PARAM += -DSD0_CS_PORT=TRISB
|
||||||
PARAM += -DSD0_PORT=2
|
PARAM += -DSD0_PORT=2
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_KERNEL_INVERT
|
PARAM += -DLED_KERNEL_INVERT
|
||||||
PARAM += -DLED_KERNEL_PIN=1
|
PARAM += -DLED_KERNEL_PIN=1
|
||||||
|
|||||||
@@ -37,13 +37,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi2 flags 0x79 # select pin RG9
|
disk sd0 at spi2 flags 0x79 # select pin RG9
|
||||||
@@ -53,16 +51,12 @@ options "SD0_CS_PIN=9" # ...use pin RA9 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# GLCD driver
|
# GLCD driver
|
||||||
device glcd0
|
device glcd0
|
||||||
options "GLCD_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
PARAM = -DSDXL
|
PARAM = -DSDXL
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DGLCD_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DSPI2_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
|
PARAM += -DGLCD_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=9
|
PARAM += -DSD0_CS_PIN=9
|
||||||
PARAM += -DSD0_CS_PORT=TRISG
|
PARAM += -DSD0_CS_PORT=TRISG
|
||||||
PARAM += -DSD0_PORT=2
|
PARAM += -DSD0_PORT=2
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_KERNEL_PIN=7
|
PARAM += -DLED_KERNEL_PIN=7
|
||||||
PARAM += -DLED_KERNEL_PORT=TRISE
|
PARAM += -DLED_KERNEL_PORT=TRISE
|
||||||
|
|||||||
@@ -38,13 +38,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi1 # SD card
|
controller spi1 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# SD card
|
# SD card
|
||||||
disk sd0 at spi1 flags 0x21 # select pin RB1
|
disk sd0 at spi1 flags 0x21 # select pin RB1
|
||||||
@@ -54,12 +52,9 @@ options "SD0_CS_PIN=1" # ...use pin RB1 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
PARAM = -DSTARTERKIT
|
PARAM = -DSTARTERKIT
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI1_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=1
|
PARAM += -DSD0_CS_PIN=1
|
||||||
PARAM += -DSD0_CS_PORT=TRISB
|
PARAM += -DSD0_CS_PORT=TRISB
|
||||||
PARAM += -DSD0_PORT=1
|
PARAM += -DSD0_PORT=1
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_KERNEL_PIN=2
|
PARAM += -DLED_KERNEL_PIN=2
|
||||||
PARAM += -DLED_KERNEL_PORT=TRISD
|
PARAM += -DLED_KERNEL_PORT=TRISD
|
||||||
|
|||||||
@@ -47,13 +47,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB
|
|||||||
|
|
||||||
# Virtual UART on USB
|
# Virtual UART on USB
|
||||||
pseudo-device uartusb
|
pseudo-device uartusb
|
||||||
options "UARTUSB_ENABLED" # TODO: delete this option
|
|
||||||
options "USB_MAX_EP_NUMBER=3"
|
options "USB_MAX_EP_NUMBER=3"
|
||||||
options "USB_NUM_STRING_DESCRIPTORS=3"
|
options "USB_NUM_STRING_DESCRIPTORS=3"
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi1 # SD card
|
controller spi1 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi1 flags 0x19 # select pin RA9
|
disk sd0 at spi1 flags 0x19 # select pin RA9
|
||||||
@@ -67,12 +65,9 @@ options "SD1_CS_PIN=10" # ...use pin RA9 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -46,11 +46,9 @@ options "CONSOLE_DEVICE=tty1" # Console on UART2
|
|||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart2 # USB-to-serial adapter
|
device uart2 # USB-to-serial adapter
|
||||||
options "UART2_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi1 # SD card
|
controller spi1 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi1 flags 0x19 # select pin RA9
|
disk sd0 at spi1 flags 0x19 # select pin RA9
|
||||||
@@ -64,12 +62,9 @@ options "SD1_CS_PIN=10" # ...use pin RA9 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
PARAM = -DUBW32
|
PARAM = -DUBW32
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUARTUSB_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI1_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
|
PARAM += -DSD1_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD1_CS_PIN=10
|
PARAM += -DSD1_CS_PIN=10
|
||||||
PARAM += -DSD1_CS_PORT=TRISA
|
PARAM += -DSD1_CS_PORT=TRISA
|
||||||
PARAM += -DSD1_PORT=1
|
PARAM += -DSD1_PORT=1
|
||||||
PARAM += -DSD0_CS_PIN=9
|
PARAM += -DSD0_CS_PIN=9
|
||||||
PARAM += -DSD0_CS_PORT=TRISA
|
PARAM += -DSD0_CS_PORT=TRISA
|
||||||
PARAM += -DSD0_PORT=1
|
PARAM += -DSD0_PORT=1
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
|
||||||
PARAM += -DUSB_MAX_EP_NUMBER=3
|
PARAM += -DUSB_MAX_EP_NUMBER=3
|
||||||
PARAM += -DUARTUSB_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
PARAM += -DCONSOLE_DEVICE=ttyUSB0
|
||||||
PARAM += -DLED_TTY_INVERT
|
PARAM += -DLED_TTY_INVERT
|
||||||
PARAM += -DLED_TTY_PIN=3
|
PARAM += -DLED_TTY_PIN=3
|
||||||
|
|||||||
@@ -34,14 +34,12 @@ config unix root on sd0a
|
|||||||
|
|
||||||
# Serial UART ports
|
# Serial UART ports
|
||||||
device uart1 # Serial-to-USB converter
|
device uart1 # Serial-to-USB converter
|
||||||
options "UART1_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# Console options
|
# Console options
|
||||||
options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
||||||
|
|
||||||
# SPI ports
|
# SPI ports
|
||||||
controller spi2 # SD card
|
controller spi2 # SD card
|
||||||
options "SPI_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# microSD card
|
# microSD card
|
||||||
disk sd0 at spi2 flags 0x44 # select pin RD4
|
disk sd0 at spi2 flags 0x44 # select pin RD4
|
||||||
@@ -52,12 +50,9 @@ options "SD0_CS_PIN=4" # ...use pin RD4 TODO: use fl
|
|||||||
|
|
||||||
# General purpose I/O ports
|
# General purpose I/O ports
|
||||||
device gpio0
|
device gpio0
|
||||||
options "GPIO_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# ADC driver
|
# ADC driver
|
||||||
device adc0
|
device adc0
|
||||||
options "ADC_ENABLED" # TODO: delete this option
|
|
||||||
|
|
||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm0
|
device pwm0
|
||||||
options "PWM_ENABLED" # TODO: delete this option
|
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
PARAM = -DWF32
|
PARAM = -DWF32
|
||||||
PARAM += -DPIC32MX7
|
PARAM += -DPIC32MX7
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DUART1_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DSPI2_ENABLED
|
||||||
|
PARAM += -DSD_ENABLED
|
||||||
PARAM += -DGPIO_ENABLED
|
PARAM += -DGPIO_ENABLED
|
||||||
|
PARAM += -DADC_ENABLED
|
||||||
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSD0_CS_PIN=4
|
PARAM += -DSD0_CS_PIN=4
|
||||||
PARAM += -DSD0_CS_PORT=TRISD
|
PARAM += -DSD0_CS_PORT=TRISD
|
||||||
PARAM += -DSD0_PORT=2
|
PARAM += -DSD0_PORT=2
|
||||||
PARAM += -DSD0_MHZ=10
|
PARAM += -DSD0_MHZ=10
|
||||||
PARAM += -DSPI_ENABLED
|
|
||||||
PARAM += -DCONSOLE_DEVICE=tty0
|
PARAM += -DCONSOLE_DEVICE=tty0
|
||||||
PARAM += -DUART1_ENABLED
|
|
||||||
PARAM += -DLED_TTY_PIN=1
|
PARAM += -DLED_TTY_PIN=1
|
||||||
PARAM += -DLED_TTY_PORT=TRISA
|
PARAM += -DLED_TTY_PORT=TRISA
|
||||||
PARAM += -DLED_DISK_PIN=0
|
PARAM += -DLED_DISK_PIN=0
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ CC = gcc -g
|
|||||||
CFLAGS = -O -Wall -Werror
|
CFLAGS = -O -Wall -Werror
|
||||||
YACC = byacc -d
|
YACC = byacc -d
|
||||||
DESTDIR = /usr/local
|
DESTDIR = /usr/local
|
||||||
OBJS = config.o main.o lang.o mkioconf.o mkmakefile.o mkheaders.o \
|
OBJS = config.o main.o lang.o mkioconf.o mkmakefile.o mkswapconf.o
|
||||||
mkswapconf.o
|
|
||||||
PROG = kconfig
|
PROG = kconfig
|
||||||
|
|
||||||
all: $(PROG) $(PROG).0
|
all: $(PROG) $(PROG).0
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ usage: fputs("usage: kconfig [-gp] sysname\n", stderr);
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
makefile(); /* build Makefile */
|
makefile(); /* build Makefile */
|
||||||
headers(); /* make a lot of .h files */
|
|
||||||
swapconf(); /* swap config files */
|
swapconf(); /* swap config files */
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,200 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 1980, 1993
|
|
||||||
* The Regents of the University of California. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by the University of
|
|
||||||
* California, Berkeley and its contributors.
|
|
||||||
* 4. Neither the name of the University nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
* SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Make all the .h files for the optional entries
|
|
||||||
*/
|
|
||||||
#include <ctype.h>
|
|
||||||
#include "config.h"
|
|
||||||
#include "y.tab.h"
|
|
||||||
|
|
||||||
void do_header(dev, hname, count)
|
|
||||||
char *dev, *hname;
|
|
||||||
int count;
|
|
||||||
{
|
|
||||||
char *file, *name, *inw, *toheader(), *tomacro();
|
|
||||||
struct file_list *fl, *fl_head, *tflp;
|
|
||||||
FILE *inf, *outf;
|
|
||||||
int inc, oldcount;
|
|
||||||
|
|
||||||
file = toheader(hname);
|
|
||||||
name = tomacro(dev);
|
|
||||||
inf = fopen(file, "r");
|
|
||||||
oldcount = -1;
|
|
||||||
if (inf == 0) {
|
|
||||||
outf = fopen(file, "w");
|
|
||||||
if (outf == 0) {
|
|
||||||
perror(file);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
fprintf(outf, "#define %s %d\n", name, count);
|
|
||||||
(void) fclose(outf);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fl_head = NULL;
|
|
||||||
for (;;) {
|
|
||||||
char *cp;
|
|
||||||
if ((inw = get_word(inf)) == 0 || inw == (char *)EOF)
|
|
||||||
break;
|
|
||||||
if ((inw = get_word(inf)) == 0 || inw == (char *)EOF)
|
|
||||||
break;
|
|
||||||
inw = strdup(inw);
|
|
||||||
cp = get_word(inf);
|
|
||||||
if (cp == 0 || cp == (char *)EOF)
|
|
||||||
break;
|
|
||||||
inc = atoi(cp);
|
|
||||||
if (eq(inw, name)) {
|
|
||||||
oldcount = inc;
|
|
||||||
inc = count;
|
|
||||||
}
|
|
||||||
cp = get_word(inf);
|
|
||||||
if (cp == (char *)EOF)
|
|
||||||
break;
|
|
||||||
fl = (struct file_list *) malloc(sizeof *fl);
|
|
||||||
bzero(fl, sizeof(*fl));
|
|
||||||
fl->f_fn = inw;
|
|
||||||
fl->f_type = inc;
|
|
||||||
fl->f_next = fl_head;
|
|
||||||
fl_head = fl;
|
|
||||||
}
|
|
||||||
(void) fclose(inf);
|
|
||||||
if (count == oldcount) {
|
|
||||||
for (fl = fl_head; fl != NULL; fl = tflp) {
|
|
||||||
tflp = fl->f_next;
|
|
||||||
free(fl);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (oldcount == -1) {
|
|
||||||
fl = (struct file_list *) malloc(sizeof *fl);
|
|
||||||
bzero(fl, sizeof(*fl));
|
|
||||||
fl->f_fn = name;
|
|
||||||
fl->f_type = count;
|
|
||||||
fl->f_next = fl_head;
|
|
||||||
fl_head = fl;
|
|
||||||
}
|
|
||||||
outf = fopen(file, "w");
|
|
||||||
if (outf == 0) {
|
|
||||||
perror(file);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
for (fl = fl_head; fl != NULL; fl = tflp) {
|
|
||||||
fprintf(outf,
|
|
||||||
"#define %s %u\n", fl->f_fn, count ? fl->f_type : 0);
|
|
||||||
tflp = fl->f_next;
|
|
||||||
free(fl);
|
|
||||||
}
|
|
||||||
(void) fclose(outf);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* count all the devices of a certain type and recurse to count
|
|
||||||
* whatever the device is connected to
|
|
||||||
*/
|
|
||||||
void do_count(dev, hname, search)
|
|
||||||
register char *dev, *hname;
|
|
||||||
int search;
|
|
||||||
{
|
|
||||||
register struct device *dp, *mp;
|
|
||||||
register int count, hicount;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* After this loop, "count" will be the actual number of units,
|
|
||||||
* and "hicount" will be the highest unit declared. do_header()
|
|
||||||
* must use this higher of these values.
|
|
||||||
*/
|
|
||||||
for (hicount = count = 0, dp = dtab; dp != 0; dp = dp->d_next)
|
|
||||||
if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
|
|
||||||
if (dp->d_type == PSEUDO_DEVICE) {
|
|
||||||
count =
|
|
||||||
dp->d_slave != UNKNOWN ? dp->d_slave : 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
/*
|
|
||||||
* Allow holes in unit numbering,
|
|
||||||
* assumption is unit numbering starts
|
|
||||||
* at zero.
|
|
||||||
*/
|
|
||||||
if (dp->d_unit + 1 > hicount)
|
|
||||||
hicount = dp->d_unit + 1;
|
|
||||||
if (search) {
|
|
||||||
mp = dp->d_conn;
|
|
||||||
if (mp != 0 && mp->d_conn != 0) {
|
|
||||||
do_count(mp->d_name, hname, 0);
|
|
||||||
search = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
do_header(dev, hname, count > hicount ? count : hicount);
|
|
||||||
}
|
|
||||||
|
|
||||||
void headers()
|
|
||||||
{
|
|
||||||
register struct file_list *fl;
|
|
||||||
|
|
||||||
for (fl = ftab; fl != 0; fl = fl->f_next)
|
|
||||||
if (fl->f_needs != 0)
|
|
||||||
do_count(fl->f_needs, fl->f_needs, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* convert a dev name to a .h file name
|
|
||||||
*/
|
|
||||||
char *
|
|
||||||
toheader(dev)
|
|
||||||
char *dev;
|
|
||||||
{
|
|
||||||
static char hbuf[80];
|
|
||||||
|
|
||||||
(void) strcpy(hbuf, dev);
|
|
||||||
(void) strcat(hbuf, ".h");
|
|
||||||
return (hbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* convert a dev name to a macro name
|
|
||||||
*/
|
|
||||||
char *tomacro(dev)
|
|
||||||
register char *dev;
|
|
||||||
{
|
|
||||||
static char mbuf[20];
|
|
||||||
register char *cp;
|
|
||||||
|
|
||||||
cp = mbuf;
|
|
||||||
*cp++ = 'N';
|
|
||||||
while (*dev)
|
|
||||||
*cp++ = islower(*dev) ? toupper(*dev++) : *dev++;
|
|
||||||
*cp++ = 0;
|
|
||||||
return (mbuf);
|
|
||||||
}
|
|
||||||
@@ -410,6 +410,7 @@ void makefile()
|
|||||||
char line[BUFSIZ];
|
char line[BUFSIZ];
|
||||||
struct opt *op;
|
struct opt *op;
|
||||||
struct cputype *cp;
|
struct cputype *cp;
|
||||||
|
struct device *dp;
|
||||||
|
|
||||||
read_files();
|
read_files();
|
||||||
strcpy(line, "../Makefile.kconf");
|
strcpy(line, "../Makefile.kconf");
|
||||||
@@ -432,6 +433,12 @@ void makefile()
|
|||||||
for (cp = cputype; cp; cp = cp->cpu_next) {
|
for (cp = cputype; cp; cp = cp->cpu_next) {
|
||||||
fprintf(ofp, "PARAM += -D%s\n", cp->cpu_name);
|
fprintf(ofp, "PARAM += -D%s\n", cp->cpu_name);
|
||||||
}
|
}
|
||||||
|
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||||
|
if (dp->d_unit <= 0)
|
||||||
|
fprintf(ofp, "PARAM += -D%s_ENABLED\n", raise(dp->d_name));
|
||||||
|
else
|
||||||
|
fprintf(ofp, "PARAM += -D%s%d_ENABLED\n", raise(dp->d_name), dp->d_unit);
|
||||||
|
}
|
||||||
for (op = opt; op; op = op->op_next) {
|
for (op = opt; op; op = op->op_next) {
|
||||||
if (op->op_value)
|
if (op->op_value)
|
||||||
fprintf(ofp, "PARAM += -D%s=\"%s\"\n", op->op_name, op->op_value);
|
fprintf(ofp, "PARAM += -D%s=\"%s\"\n", op->op_name, op->op_value);
|
||||||
@@ -523,16 +530,20 @@ do_systemspec(f, fl, first)
|
|||||||
return (fl);
|
return (fl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Convert a name to uppercase.
|
||||||
|
* Return a pointer to a static buffer.
|
||||||
|
*/
|
||||||
char *
|
char *
|
||||||
raise(str)
|
raise(str)
|
||||||
register char *str;
|
register char *str;
|
||||||
{
|
{
|
||||||
register char *cp = str;
|
static char buf[100];
|
||||||
|
register char *cp = buf;
|
||||||
|
|
||||||
while (*str) {
|
while (*str) {
|
||||||
if (islower(*str))
|
*cp++ = islower(*str) ? toupper(*str++) : *str++;
|
||||||
*str = toupper(*str);
|
|
||||||
str++;
|
|
||||||
}
|
}
|
||||||
return (cp);
|
*cp = 0;
|
||||||
|
return buf;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user