Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2ca5c57
Create keywords.txt
nseidle Jun 26, 2020
9072743
Correct typo in HAL
nseidle Jul 10, 2020
ddda09e
Add checking of RTS/CTS pins to enable flow control. Fix typo in _beg…
nseidle Jul 10, 2020
16894c2
Merge pull request #230 from sparkfun/addFlowControl
Jul 14, 2020
33bd2d9
Merge pull request #191 from sparkfun/addKeywords
Jul 14, 2020
1287ee0
Merge pull request #232 from sparkfun/release-candidate
Jul 14, 2020
2cc5ab4
Merge pull request #234 from sparkfun/release-candidate
Jul 16, 2020
0af5eb0
Merge pull request #1 from sparkfun/master
stephenf7072 Jul 23, 2020
ece522d
Removed code using <time.h> non-core library (ie. Epoch stuff)
stephenf7072 Jul 23, 2020
847eb3d
Create Example8_ResetsAndWatchdog.ino
stephenf7072 Jul 24, 2020
38d783d
Create WDT.h
adamgarbo Jul 27, 2020
d913933
Create WDT.cpp
adamgarbo Jul 27, 2020
f8d1fb9
Create library.properties
adamgarbo Jul 27, 2020
fd8e357
Create keywords.txt
adamgarbo Jul 27, 2020
57c81bd
Revert "Removed code using <time.h> non-core library (ie. Epoch stuff)"
stephenf7072 Jul 30, 2020
66b6e6e
Update WDT.h
adamgarbo Jul 30, 2020
331b8d7
Update WDT.cpp
adamgarbo Jul 30, 2020
453196d
rename example
oclyke Jul 30, 2020
03ae640
rename the actual file
oclyke Jul 30, 2020
d9b3290
Merge pull request #241 from stephenf7072/master
Jul 30, 2020
e1a7d9b
Add examples
adamgarbo Jul 31, 2020
73a813b
Add WDT configuration
adamgarbo Aug 1, 2020
6bda297
Merge remote-tracking branch 'upstream/master' into wdt
adamgarbo Aug 4, 2020
38a241b
Minor updates
adamgarbo Aug 4, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cores/arduino/am_sdk_ap3/mcu/apollo3/hal/am_hal_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ am_hal_uart_transfer_t;

// Flow control
#define AM_HAL_UART_FLOW_CTRL_NONE 0
#define AM_HAL_UART_FLOW_CTRL_CTS_ONLY UART_CR_CTSEN_Msk
#define AM_HAL_UART_FLOW_CTRL_RTS_ONLY UART_CR_RTSEN_Msk
#define AM_HAL_UART_FLOW_CTRL_CTS_ONLY UART0_CR_CTSEN_Msk
#define AM_HAL_UART_FLOW_CTRL_RTS_ONLY UART0_CR_RTSEN_Msk
#define AM_HAL_UART_FLOW_CTRL_RTS_CTS (UART0_CR_CTSEN_Msk | \
UART0_CR_RTSEN_Msk)
// FIFO enable/disable.
Expand Down
20 changes: 18 additions & 2 deletions cores/arduino/ard_sup/uart/ap3_uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,22 @@ ap3_err_t Uart::set_config(HardwareSerial_Config_e HWSconfig)
retval = AP3_INVALID_ARG;
break;
}

//Setup flow control
_config.ui32FlowControl = AM_HAL_UART_FLOW_CTRL_NONE;
if(_pinRTS != AP3_UART_PIN_UNUSED && _pinCTS != AP3_UART_PIN_UNUSED)
{
_config.ui32FlowControl = AM_HAL_UART_FLOW_CTRL_RTS_CTS;
}
else if(_pinRTS != AP3_UART_PIN_UNUSED)
{
_config.ui32FlowControl = AM_HAL_UART_FLOW_CTRL_RTS_ONLY;
}
else if(_pinCTS != AP3_UART_PIN_UNUSED)
{
_config.ui32FlowControl = AM_HAL_UART_FLOW_CTRL_CTS_ONLY;
}

return retval;
}

Expand Down Expand Up @@ -375,7 +391,7 @@ ap3_err_t Uart::_begin(void)

if (_pinRTS != AP3_UART_PIN_UNUSED)
{
retval = ap3_uart_pad_funcsel(_instance, AP3_UART_TX, ap3_gpio_pin2pad(_pinRTS), &funcsel);
retval = ap3_uart_pad_funcsel(_instance, AP3_UART_RTS, ap3_gpio_pin2pad(_pinRTS), &funcsel);
if (retval != AP3_OK)
{
return retval;
Expand All @@ -391,7 +407,7 @@ ap3_err_t Uart::_begin(void)

if (_pinCTS != AP3_UART_PIN_UNUSED)
{
retval = ap3_uart_pad_funcsel(_instance, AP3_UART_RX, ap3_gpio_pin2pad(_pinCTS), &funcsel);
retval = ap3_uart_pad_funcsel(_instance, AP3_UART_CTS, ap3_gpio_pin2pad(_pinCTS), &funcsel);
if (retval != AP3_OK)
{
return retval;
Expand Down
39 changes: 39 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#######################################
# Syntax Coloring Map For Wire
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

#######################################
# Methods and Functions (KEYWORD2)
#######################################

enableBurstMode KEYWORD2
disableBurstMode KEYWORD2
getCpuFreqMHz KEYWORD2

getInternalTemp KEYWORD2

analogWriteResolution KEYWORD2
analogWriteFrameWidth KEYWORD2
analogWriteFrequency KEYWORD2
servoWrite KEYWORD2

enableFastShift KEYWORD2
fastShiftOut KEYWORD2
fastShiftIn KEYWORD2

secs KEYWORD2
systicks KEYWORD2
sysoverflows KEYWORD2

#######################################
# Instances (KEYWORD2)
#######################################

#######################################
# Constants (LITERAL1)
#######################################