dean
a110eb10db
DM: update pwms, timer definitions
2018-08-30 15:12:32 -04:00
dean
a3493e3625
update clocks to match arduino samd
2018-08-30 15:12:32 -04:00
ladyada
49775dd780
see https://github.com/adafruit/ArduinoCore-samd/issues/37
2018-08-30 15:11:47 -04:00
dean
d3421947f9
DM: fix some pwms
2018-08-30 15:11:21 -04:00
dean
540780d3d1
DM: fix dac clock and first write bug
2018-08-30 15:11:21 -04:00
dean
87492c3a0d
DM: fix dac not holding value bug
2018-08-30 15:11:21 -04:00
dean
8106e6bfa4
DM: fix interrupts, pcc pins
2018-08-30 15:09:31 -04:00
dean
c22cb29d06
DM: delete mistake file
2018-08-30 15:08:17 -04:00
dean
9b30cd8a59
DM: fix delay microseconds
2018-08-30 15:08:17 -04:00
dean
e9857aec00
DM: update pwms for samd51
2018-08-30 15:08:17 -04:00
dean
f618756fde
DM: update feather m4 pinout for new rev
2018-08-30 15:08:16 -04:00
dean
0d70c98518
update pinout and stuff for new revision
2018-08-30 15:08:16 -04:00
dean
7f74c2126e
update usb stuff
2018-08-30 15:08:16 -04:00
dean
2c2eb81a42
DM: fixed m0 boards compilation error with math additions
2018-08-30 15:03:49 -04:00
dean
bbff6c115d
DM: some I2S stuff
2018-08-30 15:03:29 -04:00
dean
f286f9e8d4
DM: added math libraries
2018-08-30 15:03:03 -04:00
dean
f86a7b6af7
DM: updated magic number to match circuitpython stuff
2018-08-30 14:59:48 -04:00
dean
b8b35ee319
DM: fix worst bug in entire world
2018-08-30 14:59:48 -04:00
dean
fb011ea2a8
DM: we have a 12 bit dac lets use
2018-08-30 14:59:48 -04:00
dean
0908d0aee4
DM: fix tone 0 frequency
2018-08-30 14:59:17 -04:00
dean
2b0f87a73d
DM: some usb host fixes (still not working)
2018-08-30 14:59:17 -04:00
dean
498e819a51
DM: fix upload bug
2018-08-30 14:59:16 -04:00
dean
9eecac827b
DM: updates for rev B
2018-08-30 14:59:16 -04:00
dean
a7277e6547
DM: adding feather m4
2018-08-30 14:58:44 -04:00
dean
6820318d33
DM: EIC and VARIANT_MCK fix
2018-08-30 14:58:20 -04:00
dean
dc93e828f0
DM: fixed USB enumeration bug in bootloader and core
2018-08-30 14:56:11 -04:00
dean
4c1bca832e
DM: update sercom IRQs for M4
2018-08-30 14:56:11 -04:00
dean
850c490a53
DM: fixed dpll1 freq
2018-08-30 14:56:11 -04:00
dean
33e58f40c4
DM: fixed SERCOM baud rates
2018-08-30 14:55:41 -04:00
dean
9ace80d803
DM: not crystalless
2018-08-30 14:54:36 -04:00
dean
01de36ef16
DM: oops committed wrong stuff, actually fixed DPLL problems
2018-08-30 14:54:36 -04:00
dean
1cc5f0cde4
DM: lets not feed PLLs from xosc
2018-08-30 14:54:36 -04:00
dean
8a32178667
DM: bugfixes
2018-08-30 14:53:34 -04:00
dean
059b15f5dd
DM: added FPU support
2018-08-30 14:53:34 -04:00
dean
785aea4f65
DM: fixed DAC, SPI
2018-08-30 14:53:33 -04:00
dean
2ce0635ebc
DM: added metro m4 variant
2018-08-30 14:51:09 -04:00
ladyada
bc2a5fc4be
trinket m0 start
2018-08-30 14:46:42 -04:00
dean
c1827b289d
DM: added support for samd51J20A
2018-08-30 14:46:42 -04:00
dean
4810822d26
DM: mostly fixed usb enumeration delay
2018-08-30 14:44:35 -04:00
dean
b5c2b6483b
DM: clocked to 120MHZ, peripherals to 100, USB to 48
2018-08-30 14:44:35 -04:00
dean
77a2f2e9ea
DM: fixed tone
2018-08-30 14:44:35 -04:00
dean
0a2393f4ce
DM: fix switching between dac output and analogread
2018-08-30 14:44:35 -04:00
Phillip Burgess
158ed33b1c
Allow attachInterrupt() on NMI pin (PA08 on ATSAMD21E)
2018-08-30 14:44:35 -04:00
dean
df5669a403
DM: fixed pwm and dac (almost)
2018-08-30 14:34:14 -04:00
ladyada
03eae9b5c5
Add Gemma m0 - tested just about everything
2018-08-30 14:34:13 -04:00
dean
358b11addd
DM: added samd51 support
2018-08-30 14:32:21 -04:00
ladyada
3615cb1b47
bigger buffer for Wire
2018-08-30 14:27:14 -04:00
ladyada
8d5ac4304a
another A6/A7 fix
2018-08-30 14:24:09 -04:00
ladyada
b34deb4e81
align back to mainline (and put in missing Serial5) - not sure if USB serial LEDs were causing hangups on 1200baud bumps? :/
2018-08-30 14:23:07 -04:00
ladyada
d19c8e35a9
cleaned up slight difference in USB union bitflags with a new USBDevice.h - compiles blink
2018-08-30 14:21:26 -04:00
ladyada
605017712a
fixed up DAC refs
2018-08-30 14:20:50 -04:00
ladyada
ae249718d4
add USB CDC RX & TX LEDs with 10ms minimum on time, tested
2018-08-30 14:18:05 -04:00
ladyada
012d86c1d3
make it so native USB is Serial
2018-08-30 14:12:25 -04:00
Todd Treece
9eda56e7db
adds new boards.txt
2018-08-30 14:09:49 -04:00
ladyada
4e41949c96
add support for A6 (D8) and A7 (D9)
2018-08-30 14:03:04 -04:00
Martino Facchin
f4dfac890f
Always call new DoubleBufferedEPOutHandler on reconnect
...
Avoid memory leak by deleting the buffers; DoubleBufferedEPOutHandler should be refactored (in beta branch) to allow separate "new" and "setup" procedures
Fixes #350
2018-08-24 12:24:49 +02:00
Sandeep Mistry
a62ef2633b
UART frame error handling
2018-08-17 16:37:47 -04:00
gdsports
95bcb7cf3a
Fix CDC_ENABLED
...
Undefining CDC_ENABLED triggered a compiler error. With this fix, the
CDC ACM configuration can be disabled.
2018-02-20 16:49:11 -05:00
Sandeep Mistry
69fcf8db46
Make ring buffer head and tail indexes volatile
2018-02-14 12:39:57 -05:00
Sandeep Mistry
b753095e56
Correct I2C frequency calculation formula
...
Allow variant to override the default rise time in nanoseconds via
define
2018-01-25 11:31:04 -05:00
Sandeep Mistry
a7c33fea4b
UART: manually handle IRQ if DRE + interrupts disabled or in higher priority ISR
...
When write is called and TX buffer is full.
2018-01-25 11:27:16 -05:00
Mitchell Pontague
ee913a0828
samd21e sercom compatibility ( #280 )
...
Make sercom4 and sercom5 optional to allow compilation of samd21e variants.
2018-01-25 11:25:58 -05:00
Martino Facchin
2bb54068a2
Don't reallocate USB buffers if already allocated
...
USB Configuration was meant to run only once, but if the board comes back from standby the host can reconfigure the device again.
Probably a cleaner patch could be free()-ing the buffers on standby() to release the memory but at least we don't leak anymore.
Fixes https://github.com/arduino/ArduinoCore-samd/issues/293
2018-01-25 11:20:41 -05:00
Martino Facchin
503a9b3954
Make RingBuffer class template-based
...
This commit prepares to enlarge the ringbuffer for specific needs (at compile time).
Also, it fixes a spurious include in delay.h
2018-01-25 10:48:26 -05:00
Sandeep Mistry
d58b840f63
Add missing USBCON wrapper
2018-01-08 10:41:14 -05:00
agdl
8f5e2eb58c
Changed boradcast variable to enableGeneralCall
2017-12-15 09:06:48 -05:00
agdl
6a1295459b
Allow General Calls on I2C bus (aka brodcast)
2017-12-15 09:06:48 -05:00
Kees Bakker
fd15a1c603
Avoid read-modify-write when enabling SERCOM DRE interrupt
2017-12-11 08:55:04 -05:00
Sandeep Mistry
af14b97ee2
Use port manipulation instead of SERCOM h/w for UART RTS
2017-11-29 13:49:13 +01:00
Sandeep Mistry
c26a21f748
Make UART RTS + CTS configurable in constructor only
2017-11-29 13:49:13 +01:00
Sandeep Mistry
7fc402f3b5
Leverage SERCOM h/w functionality for RTS and CTS
2017-11-29 13:49:13 +01:00
Sandeep Mistry
bd1bd60815
Add optional RTS + CTS support to UART
2017-11-29 13:49:13 +01:00
Andreas Watterott
7e37bb3b12
No fixed value for USB power current.
2017-11-09 19:50:41 +01:00
Cristian Maglie
812d3e90cc
Put interrupt mask instead of interrupt num in ISR callbacks list
...
This should save some cycles inside ISR Handler.
2017-09-08 17:00:17 +02:00
Cristian Maglie
9d9fe5c097
Slightly clearer formula for interrupt config register position
2017-09-08 16:55:33 +02:00
Cristian Maglie
1330914898
Some code makeup
2017-09-08 16:05:40 +02:00
Cristian Maglie
02d8bf82a2
Fixed allocation/deallocation of interrupts subroutines
2017-09-08 15:37:29 +02:00
Cristian Maglie
d2b717871b
interrupts: remove unneeded cleanup
2017-09-08 11:35:02 +02:00
joverbee
9a49ce2fc4
Improve interrupt handling response time
...
Change the way ISRs are stored. Store now in a list on a ‘first come
first served basis’, the first interrupt that gets attached will be
served first. This improves the speed of the ISR calling from about 6us
to 2us for a single interrupt on extint14
See #200
2017-09-05 14:12:10 +02:00
joverbee
a9fa694eb7
Reset sense bits before or-writing the new sense signature
...
Solve #199
2017-09-04 16:51:36 +02:00
Cristian Maglie
af0263a60a
More accurate approximation for multiplication factor of PLL to make 48Mhz.
...
Fix #223
2017-09-01 21:35:15 +02:00
Cristian Maglie
3d51b54386
Some updates on Stream and Print class.
2017-08-23 19:22:11 +02:00
Sandeep Mistry
0ee62489c0
Replace utoa + toupper with custom loop
2017-08-23 19:21:01 +02:00
Sandeep Mistry
61b060c732
Slim serial number to hex string conversion
2017-08-23 19:21:01 +02:00
Sandeep Mistry
9370464ad0
Use SAMD21 serial number for USB serial number prefix
2017-08-23 19:21:01 +02:00
Victor Nakoryakov
4ffc9d2bdb
fix for pgm_read_ptr macro
2017-08-23 17:10:30 +02:00
Cristian Maglie
33709782bd
Merge branch 'buffer-serial-tx'
2017-07-11 16:28:04 +02:00
Cristian Maglie
08de7f176c
Fix prototypes to strictly match Arduino API
...
See https://github.com/arduino/Arduino/issues/4525
2017-07-11 16:00:11 +02:00
ladyada
06ae2087ce
fix for crystal-less startup stability
2017-07-11 15:59:31 +02:00
Adminius
74a12d0f25
changes PWM resolution to 16bit for all timers
...
PWM frequency 732 Hz
2017-07-11 15:45:38 +02:00
Sandeep Mistry
46653a61e1
Change IRQ handler to check if data is available before check for DRE
2017-07-11 12:58:15 +02:00
Sandeep Mistry
610d4a8b8b
Also check if TX buffer is empty before writing to data to UART reg directly
2017-07-11 12:58:15 +02:00
Sandeep Mistry
12b3774c3f
Use reg instead of bit to enable/disable the DRE interrupt
...
The RXC interrupt was being disabled when using bit to disable the DRE
interrupt.
2017-07-11 12:58:15 +02:00
Sandeep Mistry
aa400fd434
Update flush to also wait for TX buffer to empty
2017-07-11 12:58:15 +02:00
Sandeep Mistry
158df98d0c
Correct disableDataRegisterEmptyInterruptUART to use INTENCLR instead of INTENSET
2017-07-11 12:58:15 +02:00
Sandeep Mistry
b24c9e5b68
TX buffering for UART using RingBuffer
2017-07-11 12:58:12 +02:00
Sandeep Mistry
57c432e688
Add enable and disable data register interrupt APIs for UART
2017-07-11 12:51:58 +02:00
Sandeep Mistry
38992c2a9e
Add availableForStore method to RingBuffer
2017-07-11 12:51:58 +02:00
per1234
a32ac8cdb9
Update comments to reflect Stream functions changed from private to protected
...
These functions were changed from private to protected but the comments were not updated at that time.
In conjunction with equivalent pull requests to Arduino AVR Boards and Arduino SAM Boards, solves #6146 .
2017-07-07 10:12:25 +02:00
Sandeep Mistry
70b011b077
USB: Only swap incoming buffers for non-ZLP's
2017-05-02 10:01:03 -04:00
Martino Facchin
b9ac48c782
Implement low power functionality on USB subsystem
...
This enables remote wakeup on CDC driver, so we can safely call standby() and maintain the Serial prints on resume.
2017-04-04 10:50:22 +02:00
Cristian Maglie
213cc933d5
small fix to indentation
2017-03-31 15:12:58 +02:00
Arturo Guadalupi
91bee1d2ee
Merge pull request #203 from sandeepmistry/ota
...
Add support for updating sketches from an SD card
2017-03-02 12:30:14 +01:00
Cristian Maglie
647e729651
Removed wrong cast to uint8
...
Fix #216
2017-03-01 09:51:34 +01:00
Martino Facchin
4ac0cc1df0
Fix 8MHz clock being generated incorrectly
...
CMSIS-Atmel 4.5 changed the prescaler defines to match the bit mask, not the actual prescaler value, thus `SYSCTRL_OSC8M_PRESC_1_Val` now means "divide by 2"
Fixes https://github.com/arduino/ArduinoCore-samd/issues/214
2017-02-28 09:43:02 +01:00
Sandeep Mistry
a15d190ada
Add support for updating sketches from an SD card
...
Via 2nd stage boot code that checks SD card for UPDATE.bin
2017-02-15 15:31:18 -05:00
Martino Facchin
9dac5f1679
Merge pull request #196 from sandeepmistry/udp-begin-multi
...
Add virtual beginMulticast(...) stub to UDP class
2017-02-08 15:36:24 +01:00
Johnny Willemsen
280d92d9de
Fixed unused variable warning, see issue #209
...
* cores/arduino/wiring.c:
2017-02-07 12:49:55 +01:00
Sandeep Mistry
33efce53f5
Set full PINCFG register on pinMode(pin, OUTPUT)
2017-01-24 10:07:12 -05:00
Sandeep Mistry
d4210ea2d0
Add virtual beginMulticast(...) stub to UDP class
2017-01-03 13:41:58 -05:00
Bumsik Kim
e046d4337e
fixed utoa type conflict
2017-01-03 09:09:50 -05:00
Cristian Maglie
428433f963
Merge branch 'bootloader-cmsis-fix'
2016-12-20 16:59:12 +01:00
Martino Facchin
95963e6ff7
Merge pull request #185 from facchinm/autoconf_sketch_start_banzai_mainline
...
Add method to automatically retrieve sketch start
2016-12-20 14:39:08 +01:00
Sandeep Mistry
80f629c379
Correct epBank1EnableTransferComplete
2016-12-19 16:30:52 -05:00
Cristian Maglie
2f3b976652
Updated crystalless startup to be compliant with CMSIS-Atmel 4.5
2016-12-19 16:02:20 +01:00
Cristian Maglie
7b8e0b11ed
Added support for crystal-less configurations
2016-12-19 14:48:29 +01:00
Martino Facchin
7ddb26678f
Avoid erasing the chip if the sketch doesn't contain a bootloader
...
Use the information retrieved from the linker script in use to simply call a reset without any erase
2016-12-16 10:25:06 +01:00
Martino Facchin
ce5405f396
Add method to automatically retrieve sketch start
...
The exported variable is used by banzai() to avoid erasing any bootloader part
2016-12-15 18:48:40 +01:00
Martino Facchin
d2b2ff928e
Declare main and init so the user can't "overwrite" them
2016-12-15 18:34:15 +01:00
Martino Facchin
86ae860677
Enlarge USB serialNumber buffer
2016-12-15 18:34:05 +01:00
Sandeep Mistry
38683e36b6
Changes required for new CMSIS package upgrade
...
Fixes some compile errors and warnings
2016-12-02 10:48:52 -05:00
Sandeep Mistry
5a033fed7d
Add I2S support
2016-11-25 09:37:26 -05:00
Sandeep Mistry
e77ae8fe8e
Optimize SPI transfers
2016-11-17 17:17:05 -05:00
Cristian Maglie
ce89e7e244
Launch libc initialization after hardware setup
...
This pachs allows C++ global constructors to run after hardware
initialization. This helps some libraries that setups hardware
in class constructor to work properly.
See also #169
2016-10-11 18:40:20 +02:00
Cristian Maglie
8737fd8fb5
Merge branch 'fix-usbserial-available'
2016-10-11 00:00:17 +02:00
Cristian Maglie
b06501baee
Fix regression: SerialUSB.available() do not return correct values
...
Fix #172
2016-10-10 12:43:14 +02:00
Mike D
126b167693
Fixed issue where pins were not being configured properly in analogWrite when multiple channels of the same TCC/TC module were being used to drive outputs.
2016-10-03 11:55:43 -07:00
Cristian Maglie
13b371ba37
Merge remote-tracking branch 'sandeep/usb-send-timeout-take-2' into HEAD
2016-09-15 15:08:36 +02:00
Sandeep Mistry
c7c6f709b5
WString: add toDouble
...
Port of https://github.com/arduino/Arduino/pull/5362
2016-09-14 13:46:30 -04:00
Sandeep Mistry
b2462a5a1a
Remove line state check in Serial_::write
...
It’s no longer needed with the timeout mechanism in USBCore.
2016-08-31 11:21:40 -04:00
Sandeep Mistry
8f7873cea5
Add comment on inspiration
2016-08-31 11:21:40 -04:00
Sandeep Mistry
8afe969ed2
Make transmit timeout per endpoint
2016-08-31 11:21:40 -04:00
Sandeep Mistry
b627e00b17
Add USB send timeout
...
Timeout is checked on the next send attempt. Initial timeout is set to
70ms, after a time out occurs and the previous transfer is still not
complete a send will report as failed. If a send times out, a ZLP will
be in the send queue to check for future timeouts.
2016-08-31 11:21:40 -04:00
Cristian Maglie
5dd2adc41d
USBD: Rewritten RX/TX LED conditions in a slighlty more clear way
2016-08-29 17:06:56 +02:00
Cristian Maglie
0605c11e76
USBD: RX LED now blinks again (fixed regression)
2016-08-29 17:05:16 +02:00
Cristian Maglie
4691ef4ba0
USB: Added optimized Stream::readBytes for EP OUT handler
...
This bypass the generic (but inefficient) implementation of Stream::readBytes
and uses an optimized version of readBytes than can do efficient multi-byte reads.
2016-08-24 12:50:37 +02:00
Cristian Maglie
3127d1dc51
USB-CDC: Increased buffer size to 256 bytes
...
This change improves read performance when massive data is sent
via USB by exploiting the hardware capability to handle multi-packet
transfers autonomously.
2016-08-24 12:50:25 +02:00
Cristian Maglie
5265e1215a
USB: EP0 ::recv method has been merged with ::read method
...
It makes no sense to have ::recv calling repeatedly ::read in this
case.
2016-08-24 12:37:27 +02:00
Cristian Maglie
2e44a4d961
USBD: Added critical sections to EP OUT handler
2016-08-24 01:04:58 +02:00
Cristian Maglie
a9127228d6
USB: Slightly refactored EP OUT handler
...
Now the release() function only performs the action that is called for,
i.e. release the endpoint and let it receive data. All the buffers handling
has been inlined in the callers, this also slightly improves performance
because it allows to remove some redundant checks.
2016-08-24 01:04:58 +02:00
Cristian Maglie
87bf6e1bf1
Fixed some comments
2016-08-24 01:04:58 +02:00
Cristian Maglie
3ba1a35296
Moved EPHandler in USBDevice headers
...
The reference to the upper USBDevice class is passed on
the EPHandler constructor.
2016-08-24 01:04:58 +02:00
Cristian Maglie
7d37753904
USB-CDC: OUT EP is now handled with a custom EPHandler
2016-08-24 01:04:58 +02:00
Cristian Maglie
9f24bbe9a8
USB: Added an OUT EP handler with double buffering.
2016-08-24 01:04:58 +02:00
Cristian Maglie
b2ddb2267d
USB: Added interface to possibly setup dynamic USB EP Handler
2016-08-24 01:04:58 +02:00
Cristian Maglie
34bf5421f8
USB: set return type of USBDevice::recv(ep) to int
...
this is the proper type to encapsulate a byte when data is available
or -1 when there is no data.
2016-08-24 01:04:58 +02:00
Cristian Maglie
40d9554ed3
USB-CDC: Avoid need to send ZLP by sending up to (EPX_SIZE-1) bytes at a time
2016-08-24 01:04:58 +02:00
Cristian Maglie
07263f8bf3
USB-CDC: reset EP OUT count upon reception
2016-08-24 01:04:58 +02:00
Cristian Maglie
19ae0eb4d4
USB-CDC: access to rx buffer is now ISR-protected
2016-08-24 01:04:58 +02:00
Cristian Maglie
9f678cb416
USB-CDC: Refactored EP OUT handling
2016-08-24 01:04:58 +02:00
Sandeep Mistry
e4f7bf513d
Add private availableForStore method, and use in Serial_::accept
2016-08-24 01:04:58 +02:00
Sandeep Mistry
cea1d20f27
Enable transfer complete in USBDeviceClass::recv once bank is empty
2016-08-24 01:04:58 +02:00
Cristian Maglie
0d644d73e9
Removed unused code
2016-07-20 12:27:00 +02:00
Sandeep Mistry
533d7ccaeb
Merge branch 'fix-pwm' of https://github.com/cmaglie/ArduinoCore-samd
...
Fixed PWM frequency glitch
2016-07-19 09:14:38 -04:00
Sandeep Mistry
94d6f56cee
Port arduino/Arduino#4667 to SAMD core
2016-07-18 15:13:41 -04:00
Sandeep Mistry
0a35b5535a
Add getTimeout accessor method to Stream
...
Port of https://github.com/arduino/Arduino/pull/4718 to SAMD core.
2016-07-18 14:29:55 -04:00
Sandeep Mistry
40e5a4fcee
Make String::move of an invalidated String result in an invalidated String
2016-07-12 17:42:40 -04:00
Arturo Guadalupi
2f0f349943
Merge pull request #98 from sandeepmistry/write-slave-tx-buffer
...
Use TX buffer for Wire slave writes
2016-07-08 16:52:06 +02:00
Arturo Guadalupi
f054f5c714
Merge pull request #101 from sandeepmistry/digital-read-write-pullup
...
Enable digitalRead on output pins, only enable pull-up in digitalWrite if pin is not output
2016-07-08 16:30:39 +02:00
Arturo Guadalupi
5b2c475376
Merge pull request #148 from sandeepmistry/SerialUSB.availableForWrite
...
Add Serial_::availableForWrite()
2016-07-07 18:12:49 +02:00
Cristian Maglie
c9f315b9b2
Set PWM frequency to 732.4Hz
2016-06-30 20:15:35 +02:00
Cristian Maglie
f221d1f1bd
Fixed PWM frequency glitch
2016-06-30 20:15:35 +02:00
Cristian Maglie
156884bc02
Fixed whitespaces, removed some prefixes from variables names
2016-06-29 17:20:37 +02:00
Cristian Maglie
683845e484
Update string class to upstream version
2016-06-29 16:55:36 +02:00
Cristian Maglie
49a66b4784
Fix typo in cortex_handlers.
...
Fix #149
2016-06-27 13:16:11 +02:00
Sandeep Mistry
e5166fb922
Use TX buffer for slave writes, empty on master read mode + DRDY IRQ
2016-06-17 09:55:49 -04:00
Sandeep Mistry
214f990bdb
Define RAMSTART, RAMSIZE, RAMEND
2016-06-17 09:35:35 -04:00
Arturo Guadalupi
42dd310a35
Merge pull request #146 from sandeepmistry/serial-availableForWrite
...
Add Uart::availableForWrite()
2016-06-07 09:04:26 +02:00
Arturo Guadalupi
f3a29a7da6
Merge pull request #143 from sandeepmistry/cdc-write-return-value
...
Correct SerialUSB return value
2016-06-06 17:24:16 +02:00
Sandeep Mistry
97e9c26fd7
Add Serial_::availableForWrite
2016-06-06 10:00:21 -04:00
Sandeep Mistry
76ca382f00
Add Uart::availableForWrite()
2016-06-03 09:28:09 -04:00
Sandeep Mistry
470c21067f
Add snprintf_P stub
...
Port of https://github.com/arduino/Arduino/pull/4996
2016-05-30 14:27:49 -04:00
Sandeep Mistry
1634b5e0cb
Code styling for #144
2016-05-30 11:55:47 -04:00
rocketscream
bfd2a0bb28
Fix Serial.flush() blocking if called immediately after Serial.begin().
2016-05-30 11:54:18 -04:00
Sandeep Mistry
8d0c167462
Change return value of Serial_::write to be the # of bytes written
...
Previous 0 was always returned.
2016-05-27 11:22:49 -04:00
Sandeep Mistry
8ef9bb3d7b
Make return value of USBDeviceClass::send the bytes sent
2016-05-27 11:21:34 -04:00
Cristian Maglie
37c256bfc3
Removed whitespaces in WString.h
2016-04-20 20:28:25 +02:00
Cristian Maglie
b527f11472
Strings now support iterators
2016-04-20 20:28:02 +02:00
Cristian Maglie
2e9e453586
Merge branch 'usb-tx-rx-led' of https://github.com/sandeepmistry/ArduinoCore-samd
2016-04-19 16:18:36 +02:00
Sandeep Mistry
49f0d67161
Bump ARDUINO_SAMD_VARIANT_COMPLIANCE to 100606
2016-04-06 13:39:49 -04:00
Sandeep Mistry
90bf3d5cce
Make Arduino.h version of digitalPinToInterrupt return argument
2016-04-06 13:12:16 -04:00
Sandeep Mistry
2e620d7019
Move digitalPinToInterrupt definition to Arduino.h if variant compliance it 1.6.5 or higher
2016-04-06 13:12:15 -04:00
Sandeep Mistry
0352cc8558
Change digitalPinToInterrupt to return pin, and use g_APinDescription[pin].ulExtInt to map pin inside attachInterrupt/detachInterrupt
...
This brings things inline with the atachInterrupt documentation for
usage:
attachInterrupt(digitalPinToInterrupt(pin), ISR, mode);
2016-04-06 13:12:15 -04:00
Sandeep Mistry
96a759de13
Correct prog_int64_t and prog_uint64_t typedefs
2016-04-05 09:37:11 -04:00
Sandeep Mistry
cee4a8d8e6
Descriptor type (0x03) should be second byte for string descriptor
2016-03-30 14:00:57 -04:00
Sandeep Mistry
ba1ad40168
Add cast for string passed into strlen
2016-03-30 14:00:57 -04:00
Cristian Maglie
ea894b1efe
Fixed USB sendStringDescriptor
2016-03-30 14:00:56 -04:00
Sandeep Mistry
ba02d346d2
Add USB transfer RX/TX LED blinking
...
Only enabled if PIN_LED_TXL or PIN_LED_RXL is defined
2016-03-04 15:16:31 -05:00
Sandeep Mistry
dd6890a378
Use modulo operator in Print::printNumber
...
Port of @tico-tico’s change in
https://github.com/tico-tico/Arduino/commit/a7454b6b5c59187b95c4224aad87
bb01faa06e85 to SAMD core.
2016-03-03 12:06:22 -05:00
Cristian Maglie
0d57cfefe7
Set MANW bit of NVMCTRL to 1 at startup (default is 0).
...
This prevents accidental overwrites of the bootloader if a NULL
pointer is used for writing by mistake.
2016-02-26 17:23:06 +01:00
Sandeep Mistry
c6087868df
Merge branch 'master' of https://github.com/rocketscream/ArduinoCore-samd
2016-02-23 13:17:02 -05:00
Sandeep Mistry
610a937ed1
Only re-enable IRQ if PRIMASK was 0 before disabling IRQ
2016-02-18 20:18:00 +01:00
Cristian Maglie
e8d6cf5aad
Merge branch 'wire-slave-address-exact-match' of https://github.com/sandeepmistry/ArduinoCore-samd
2016-02-18 19:37:20 +01:00
Sandeep Mistry
155f259391
Force link _printf_float in dtostrf
2016-02-16 12:03:59 -05:00
Sandeep Mistry
c9a0009196
Merge branch 'MIDIdescriptorsFix' of https://github.com/arduino/ArduinoCore-samd
2016-01-26 12:07:45 -05:00
Sandeep Mistry
a08cb3fea9
Make assigning PULLEN value in digitalWrite a bit clearer
2016-01-21 14:27:04 -05:00
Sandeep Mistry
bf454d85fc
Clean up port, pin, and pin mask duplication in digitalWrite
2016-01-21 14:25:56 -05:00
Sandeep Mistry
0f3f80a1cc
Only update pull-up value in digitalWrite if pin direction is not output
2016-01-21 14:20:00 -05:00
Sandeep Mistry
ba0488d69a
Disable pull-ups on pinMode OUTPUT
2016-01-21 14:13:09 -05:00
Sandeep Mistry
e431bf7f91
Enable input on pinMode OUTPUT to support reading back current value via digitalRead
2016-01-21 14:11:21 -05:00
Sandeep Mistry
2a37de989a
Correct use of I2C slave address mask, it should be set to 0 for exact match
2016-01-19 11:38:55 -05:00
Tom Keddie
7fad702687
Change flush semantics to match AVR, fixes https://github.com/arduino/ArduinoCore-samd/issues/82
2016-01-18 11:46:45 +01:00
Tom Keddie
4bba56fdfb
Fix https://github.com/arduino/ArduinoCore-samd/issues/83 by changing to 16 bits
2016-01-18 11:46:45 +01:00
Sandeep Mistry
3ea315a0e3
Port some AVR Serial_ (SerialUSB) API's over
2016-01-15 09:13:34 -05:00
Cristian Maglie
f763660671
Merge branch 'wire-master-repeated-starts' of https://github.com/sandeepmistry/ArduinoCore-samd
2016-01-13 11:31:38 +01:00
rocketscream
d58b22d12c
Fixed attachInterrupt() for use during sleep
2016-01-12 16:11:34 +08:00
Sandeep Mistry
20104a6c77
Use asynchronous fractional mode to configure UART
2016-01-05 10:57:32 -05:00
Sandeep Mistry
8a95c1eab3
Merge remote-tracking branch 'gh-megabit/usbcpp-warning-fix'
2016-01-04 14:42:54 -05:00
Cristian Maglie
a1739d0179
Added more pgmspace.h equivalents
2016-01-04 18:55:07 +01:00
Luke McConnell
069b760174
Resolve compiler warning in USBCore
...
Resolve compiler warning from performing arithmetic on void pointers
2016-01-03 15:25:20 +00:00
agdl
17734c50d4
Fixed MIDI descriptors
...
To be compliant with the one sent by the AVR core
2015-12-17 12:26:31 +01:00
Thibaut VIARD
132b219893
Adding more available ADC channels for SAMD21J18
...
Signed-off-by: Thibaut VIARD <aethaniel@sam-geek.org>
2015-12-16 12:18:50 +01:00
Sandeep Mistry
eb397e2b4d
Port Stream parseInt and parseFloat enhancements to SAMD
...
Also add Stream::find(char) API.
Port of: https://github.com/arduino/Arduino/pull/3337
2015-11-23 17:02:52 -05:00
Cristian Maglie
e034b1a454
Added compatibility defines for core's variant files
...
The variant's file compliance is now determined using a define named
ARDUINO_SAMD_VARIANT_COMPLIANCE
that refer to the minimum core version required for this variant file
to work.
2015-11-20 21:09:54 +01:00
Cristian Maglie
80d212a0cc
Pin peripheral for analogRead is always PIO_ANALOG.
...
The attribute ATTR_ANALOG is needed to select DAC, so it has been
removed from pins A1..A5 that doesn't have a DAC.
2015-11-20 21:07:03 +01:00
Cristian Maglie
46ca790fce
Added PIN_ATTR_TIMER_ALT attribute for correct timer selection
...
The selection of the correct timer peripheral is now
decided through the PIN_ATTR_{TIMER/TIMER_ALT} attribute.
2015-11-20 21:07:03 +01:00
Cristian Maglie
04bda59c48
Merge branch 'Wire-slave' of https://github.com/sandeepmistry/ArduinoCore-samd
2015-11-18 19:01:26 +01:00
Sandeep Mistry
a2949d505f
Wait for idle or bus owner state in startTransmissionWIRE instead of storing repeated start state.
2015-11-18 09:19:04 -05:00
William
b993249630
Add I2C Repeated Start Capability
...
Adjust requestFrom, endTransmission, and startTransmissionWire to handle
repeated starts
2015-11-17 16:00:54 -05:00
Cristian Maglie
0d83c9692a
Added missing definitions in WVariant.h
2015-11-17 17:14:00 +01:00
Cristian Maglie
2a9cbd4cfa
Added missing timers definition in WVariant.h
2015-11-17 17:13:40 +01:00
Arturo Guadalupi
5d10da282d
Merge pull request #55 from arduino/toneFix
...
Tone fix for #59 and optimizations
2015-11-11 09:07:47 +01:00
tuxedo0801
8d601813ca
Added missing begin() variant with 2nd argument for configuring serial port (parity etc..)
2015-11-06 14:51:58 +01:00
Sandeep Mistry
2ceac4411c
Add getDataOrderSPI API to Sercom
2015-11-04 15:05:18 -05:00
Cristian Maglie
7bbafe53bd
Print not aborting on write failure
...
See https://github.com/arduino/Arduino/issues/3614
2015-10-26 12:04:38 +01:00
agdl
823cbce4b5
Tone fix for #59 and optimizations
...
This fixes issue #59 and optimize the way the prescaler is found.
Furthermore non needed instructions are not repeated.
2015-10-22 15:39:28 +02:00
Martino Facchin
86fa94fdc7
PUSB: add iSerial USB field
2015-10-21 16:48:13 +02:00
Cristian Maglie
ba66285747
Merge remote-tracking branch 'facchinm/pluggable-hid' into HEAD
2015-10-12 17:21:30 +02:00
Martino Facchin
02945cc78e
[PluggableUSB] port to stable API
2015-10-12 15:28:07 +02:00
Cristian Maglie
6f2482c416
Updated IPAddress to the latest version
2015-09-24 16:07:11 +02:00
Martino Facchin
87bbaaa43d
fix PUSB_getInterface return value
2015-09-16 14:56:21 +02:00
Martino Facchin
81475510fa
fix pluggableUSB OUT packets
2015-09-16 12:59:53 +02:00
Martino Facchin
6d2f3db02a
adapt USB core to PluggableUSB
2015-09-16 12:59:53 +02:00
Cristian Maglie
81cbda3aa6
Fixed bug in USBCore::send... (yikes!)
2015-09-10 18:47:08 +02:00
Cristian Maglie
ac16594d2a
Disabled SRAM shortcut when in USBCore::send
...
The shortcut has some issues:
- sometimes it fails when sending an odd number of bytes (may be
due to memory alignment?)
- the data pointer should point to "stable" data (and this is not
guaranteed by caller, it may be some sort of temporary buffer)
- the SRAM is not guaranteed to start at 0x20000000
All the above problems must be properly fixed before reenabling
this part
2015-09-10 16:08:32 +02:00
Cristian Maglie
45d787ddb6
Removed some unused warning in USB-Core
2015-09-09 15:43:25 +02:00
Cristian Maglie
a6fa8329aa
Fixed a lot of warnings in USBHost
2015-09-09 15:43:25 +02:00
Cristian Maglie
e748f0985f
Moved USB ISR handler in startup.c
2015-09-09 15:42:58 +02:00
Jean-Christophe BUDA
fe4d51f851
Update for host and Device USB
2015-09-09 15:42:06 +02:00
Jean-Christophe BUDA
6608091768
HID class fixes
2015-09-09 15:42:05 +02:00
Martino Facchin
ff8bc8996a
use different EP for CDC IN and OUT
2015-09-09 15:42:05 +02:00
Jean-Christophe BUDA
ffd05f251a
Fix to USBDevice blocking-send
2015-09-09 15:42:05 +02:00
Martino Facchin
9d0d5d6158
fix back-to-back SerialUSB test
2015-09-09 15:42:05 +02:00
Martino Facchin
90d2f8032a
USB: fix CDC endpoints
...
* fix in_endpoint buffer size (was too big)
* use the same EP for CDC_ENDPOINT_OUT and CDC_ENDPOINT_IN (different buffers)
* fix CDC_ENDPOINT_IN ep type
2015-09-09 15:42:05 +02:00
Cristian Maglie
3ddf463e89
USBDevice: added 'full' flag to USB buffer
...
This way all the 64 bytes available can be filled up
2015-09-09 15:42:05 +02:00
Cristian Maglie
44174a0ae6
USB device refactoring (WIP)
2015-09-09 15:42:05 +02:00
Sandeep Mistry
4efe39eb49
Changes to get Wire slave receiver working
2015-09-08 17:47:30 -04:00
Cristian Maglie
b0e8ff0675
WInterrupts: optimized use of digitalPinToInterrupt()
2015-09-04 17:21:19 +02:00
Cristian Maglie
e53a7a7ad1
Removed redundant #ifdef __cplusplus in WInterrupts.c
2015-09-04 17:17:22 +02:00
Cristian Maglie
d654db2248
Cosmetic changes in WInterrupt.*
2015-09-04 17:16:21 +02:00