Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
0ff5a0c7
Commit
0ff5a0c7
authored
11 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Correct port direction for Arduino MISO signal
parent
d9279feb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
configs/arduino-due/README.txt
+27
-19
27 additions, 19 deletions
configs/arduino-due/README.txt
configs/arduino-due/src/arduino-due.h
+4
-4
4 additions, 4 deletions
configs/arduino-due/src/arduino-due.h
drivers/spi/spi_bitbang.c
+3
-0
3 additions, 0 deletions
drivers/spi/spi_bitbang.c
with
34 additions
and
23 deletions
configs/arduino-due/README.txt
+
27
−
19
View file @
0ff5a0c7
...
...
@@ -122,6 +122,11 @@ ITEAD 2.4" TFT with Touch
The Arduino 2.4" TFT Touch shield uses the S6D1121 controller , it
supports 8-bit data interface. The touch IC is XPT2046.
NOTE: When used with the ITEAD shield, the power from the USB connector
seems to be inefficient (for example, I lose the USB connection when I
insert an SD card). I recommends using a 7-12V power supply with the
Arduino in this case.
Connector:
---------- --------------------------- ----------- --------------------------- ------------------
...
...
@@ -863,25 +868,28 @@ Configurations
reconfiguration process.
2. Unless stated otherwise, all configurations generate console
output on UART1 which is available on J1 or J4 (see the
section "Serial Consoles" above). USART1 or the virtual COM
port on UART0 are options. The virtual COM port could
be used, for example, by reconfiguring to use UART0 like:
System Type -> AT91SAM3/4 Peripheral Support
CONFIG_SAM_UART0=y
CONFIG_SAM_UART1=n
Device Drivers -> Serial Driver Support -> Serial Console
CONFIG_UART0_SERIAL_CONSOLE=y
Device Drivers -> Serial Driver Support -> UART0 Configuration
CONFIG_UART0_2STOP=0
CONFIG_UART0_BAUD=115200
CONFIG_UART0_BITS=8
CONFIG_UART0_PARITY=0
CONFIG_UART0_RXBUFSIZE=256
CONFIG_UART0_TXBUFSIZE=256
output on UART0 which is available both on the USB virtual COM port
and on the PWML connector (see the section "Serial Consoles" above).
However, the pin usage by the ITEAD TFT shield conflict with the pin
usage for UART0. In this case you need to switch to USART0 by
modifying the configuration as follows:
Board Selection -> Peripheral
CONFIG_SAM34_UART0=n : Disable UART0. Can't use with this shield
CONFIG_SAM34_USART0=y : Enable USART0
CONFIG_USART0_ISUART=y
Device Drivers -> Serial
CONFIG_USART0_SERIAL_CONSOLE=y : Configure the console on USART0
CONFIG_USART0_RXBUFSIZE=256
CONFIG_USART0_TXBUFSIZE=256
CONFIG_USART0_BAUD=115200
CONFIG_USART0_BITS=8
CONFIG_USART0_PARITY=0
CONFIG_USART0_2STOP=0
NOTE: USART0 TTL levels are available on COMM 5 (TXD0) and COMM 6 (RXD0).
3. Unless otherwise stated, the configurations are setup for
Linux (or any other POSIX environment like Cygwin under Windows):
...
...
This diff is collapsed.
Click to expand it.
configs/arduino-due/src/arduino-due.h
+
4
−
4
View file @
0ff5a0c7
...
...
@@ -205,8 +205,8 @@
# define GPIO_SD_SCK (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \
GPIO_PORT_PIOB | GPIO_PIN27)
# define GPIO_SD_MISO (GPIO_
OUT
PUT | GPIO_CFG_
DEFAULT
| GPIO_
OUTPUT_CLEAR
| \
GPIO_PORT_PIOD |
GPIO_PIN8)
# define GPIO_SD_MISO (GPIO_
IN
PUT | GPIO_CFG_
PULLUP
| GPIO_
PORT_PIOD
| \
GPIO_PIN8)
# define GPIO_SD_MOSI (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \
GPIO_PORT_PIOD | GPIO_PIN7)
...
...
@@ -241,8 +241,8 @@
# define GPIO_TSC_SCK (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \
GPIO_PORT_PIOA | GPIO_PIN24)
# define GPIO_TSC_MISO (GPIO_
OUT
PUT | GPIO_CFG_
DEFAULT
| GPIO_
OUTPUT_CLEAR
| \
GPIO_PORT_PIOC |
GPIO_PIN22)
# define GPIO_TSC_MISO (GPIO_
IN
PUT | GPIO_CFG_
PULLUP
| GPIO_
PORT_PIOC
| \
GPIO_PIN22)
# define GPIO_TSC_MOSI (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \
GPIO_PORT_PIOA | GPIO_PIN16)
...
...
This diff is collapsed.
Click to expand it.
drivers/spi/spi_bitbang.c
+
3
−
0
View file @
0ff5a0c7
...
...
@@ -238,6 +238,8 @@ static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
bool
selected
)
{
FAR
struct
spi_bitbang_s
*
priv
=
(
FAR
struct
spi_bitbang_s
*
)
dev
;
spivdbg
(
"devid=%d selected=%d
\n
"
,
devid
,
selected
);
DEBUGASSERT
(
priv
&&
priv
->
low
->
select
);
priv
->
low
->
select
(
priv
,
devid
,
selected
);
}
...
...
@@ -287,6 +289,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
static
void
spi_setmode
(
FAR
struct
spi_dev_s
*
dev
,
enum
spi_mode_e
mode
)
{
FAR
struct
spi_bitbang_s
*
priv
=
(
FAR
struct
spi_bitbang_s
*
)
dev
;
DEBUGASSERT
(
priv
&&
priv
->
low
->
setmode
);
priv
->
low
->
setmode
(
priv
,
mode
);
spivdbg
(
"mode=%d exchange=%p
\n
"
,
mode
,
priv
->
exchange
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment