Michael Keller
19c1709250
Added support for multiple serial inverters.
2017-01-14 00:27:02 +13:00
fishpepper
7ec2031ce5
bugfix for sending when parity is enabled
2016-11-24 20:07:19 +01:00
J Blackman
855e0a9f90
Merge pull request #1305 from martinbudden/bf_serial_callback_rename
...
Renamed serial port callback
2016-10-13 04:26:37 +11:00
borisbstyle
aaafd4f661
Merge branch 'master' into development
2016-10-12 10:15:13 +02:00
Martin Budden
53981adbb7
Renamed serial port callback
2016-10-12 08:39:06 +01:00
nathan
3c5beffb99
optionally guard uart1 for ppm, depends on #1290
2016-10-10 22:54:24 -07:00
Martin Budden
661aa7469d
Made serial const correct
2016-10-03 23:00:16 +01:00
blckmn
9c303d6669
VCP improvements to remove need for delay in serial_cli for F4 targets.
2016-08-13 11:23:35 +10:00
Martin Budden
541f4d4018
Directory rearrangement to reflect cleanflight changes
2016-08-07 13:44:00 +01:00
Martin Budden
168469236b
Tidied serial and telemetry files
2016-08-01 06:45:59 +01:00
Martin Budden
3d8ee50934
Removed unnecesary #includes from drivers
2016-07-11 18:45:35 +01:00
blckmn
c4e75e456c
Move to UART naming convention where possible (rather than USART).
2016-07-09 14:51:23 +10:00
Scott Shawcroft
a4e5e30152
Stop using uint8_t to determine if bytes are available from USB. If we buffer more than that we'll never be able to read it all.
2016-06-25 10:52:54 -07:00
blckmn
51a99e74c6
STM32F4: USARTS 4,5,6 added
...
Flag initialisation for motor_pwm_protocol
Fixes for AlienFlightF4 and timers
2016-06-08 05:43:28 +10:00
blckmn
7ca39bbde6
STM32F4: Drivers
2016-06-08 05:37:08 +10:00
Michael Hope
195456f9ac
serial: allow buffering to speed up USB virtual COM ports.
...
Add begin write and end write hints. If implemented by the serial
driver, then the driver can buffer up data sent via serialWrite() and
flush it when serialEndWrite() is called.
Implemented at the buffer level as it requires the least change to how
serial_msp and serial_cli are architected.
Also tidy up the visibility in the VCP driver.
Signed-off-by: Michael Hope <mlhx@google.com>
2016-02-02 23:36:25 +01:00
Michael Hope
96306ff9ab
serial: add writeBuf() and implement for USB.
...
This lets USB send up to 32 bytes in a frame instead of 32 one byte
frames. Add a fallback for drivers that don't implement writeBuf().
Signed-off-by: Michael Hope <mlhx@google.com>
2016-02-02 23:36:24 +01:00
borisbstyle
4b3ba927e9
Merge branch 'master' into betaflight
...
Conflicts:
src/main/blackbox/blackbox_io.c
src/main/drivers/serial_usb_vcp.c
src/main/flight/imu.c
src/main/mw.c
src/main/target/CC3D/target.h
2015-10-12 23:53:43 +02:00
Nicholas Sherlock
6e504ca52a
Ability to see how many Tx bytes are free in serial port buffer
2015-10-01 16:48:56 +13:00
Konstantin Sharlaimov (DigitalEntity)
45a4f11f92
Added #define for imu debug output (+16 squashed commit)
...
Squashed local commits:
from : e4265d4a13f63f82d5cf55eea2c091622f96660b
up to (inc): 72416dc74745fa8bae1aded79aa4b9ed0e389076
2015-09-19 14:50:53 +02:00
Petr Ledvina
4c60f6c795
Fix 303 serial inversion and bidir mode
...
- USART_HalfDuplexCmd must be called only when USART is disabled
- input should be PullDown for inverted serial
- INVERTED BIDIR mode changed to GPIO_OType_PP (not opendrain) - opendrain won't work well for inverted serial; USART releases pin when transmission is done, so PP is OK
2015-03-31 15:01:28 +02:00
Nicholas Sherlock
3c543d36c8
Change port mode MODE_BIDIR into a port option instead
2015-03-19 13:42:13 +13:00
Nicholas Sherlock
344e8fbf04
Make serial port option checks consistent
2015-03-19 12:56:11 +13:00
Nicholas Sherlock
159f57f583
Add new serial port options field (inversion, stop bits, etc)
2015-03-19 12:56:11 +13:00
Nicholas Sherlock
cee021706b
Merge remote-tracking branch 'upstream/master' into blackbox-serial-baud
2015-03-11 13:31:30 +13:00
Nicholas Sherlock
cbaa67f1d0
Add 230400 & 250000 baud rates, 2 stop-bits port mode
2015-03-06 20:07:07 +13:00
Petr Ledvina
7c62ec9755
Move internal serial interface into separate header file
...
Declaring function from other file is quite dangerous - there is no warning if interfaces get out of sync
2015-02-23 09:17:06 +01:00
Dominic Clifton
53406a7ac7
Relocate some structures and code to the right places.
...
This cleans up the include file order somewhat and fixes a couple of
dependencies.
The goal of this is to rename flight.c/flight.h to pid.c/pid.h.
2015-01-31 23:47:51 +01:00
Dominic Clifton
916aa60254
STM32F3 - Support hardware serial inversion.
...
Tested on the Sparky board with an FrSky X4RSB without external hardware
inverter.
2014-12-26 12:16:24 +00:00
Dominic Clifton
e8dbb77db5
UART1 - Fix interrupt race condition which resulted in UART randomly
...
stopping transmission of data.
2014-12-13 19:45:02 +00:00
Dominic Clifton
ea9633f2b1
Minor usart code readability improvement.
2014-12-13 18:05:22 +00:00
Dominic Clifton
6d1b0cec40
USART fixes based on feedback from @ledvinap.
2014-12-13 11:38:01 +00:00
Dominic Clifton
9b81dea320
Fix USART total bytes waiting when tx/rx buffer sizes are not equal.
...
Avoid using % operator. Allow buffer sizes that are not powers of two.
2014-12-13 03:29:24 +00:00
Petr Ledvina
57c308538f
Whitespace cleanup
...
Misplaced whitespace fixed, no functional changes
2014-11-24 21:39:25 +01:00
Frank Zhao
6311dc8f8c
added single wire half duplex UART
...
Conflicts:
src/main/telemetry/telemetry.h
2014-11-12 00:29:42 +00:00
Petr Ledvina
aa7f5c4a1e
New timer implementation
...
This is first part of new softserial code. Main timer code is changed, changes to rest of code are kept to minimum.
macros for BASEPRI based synchronization are added to project (atomic.h)
TIMER_PERIOD fixed in pwm_rx.c
2014-11-07 15:38:26 +01:00
Dominic Clifton
db36cfe12e
Fix arm/disarm/arm bug when using shared msp/telemetry ports.
...
All msp ports are now re-initialised when disarming.
Bug wa introduced by c06fd78b83
- see
#144 .
Runtime serial port scenario should not have been erased.
Fixes #144 and #155 . Cleanup #125 .
2014-11-05 20:23:59 +00:00
Dominic Clifton
a65a937313
STM32F3 - Fix uartReconfigure. Closes #125 .
2014-10-28 15:55:07 +00:00
Petr Ledvina
e686b4504e
Centralized NVIC priorities
...
- NVIC priorities are moved to separate file, all values are replaced wit symbolic names. Priorities should be the same.
- tiny change in DMA initialization
2014-10-23 16:48:35 +02:00
Dominic Clifton
d60183d91d
Normalize all the line endings
2014-09-15 23:40:17 +01:00
Dominic Clifton
b01724681a
CC3D - Support USART3 instead of USART2.
...
This has highlighted that the existing codebase is quite targeted
towards systems that use USART1 and 2. Annoyingly the inverter is on
USART1 and the sbus code requires callbacks so still won't work yet.
2014-08-07 19:17:46 +01:00
Dominic Clifton
4d9a672d9c
CC3D / NAZE - Adding support for hardware controlled inverter for use by
...
SBUS RX.
2014-08-02 00:43:06 +01:00
Dominic Clifton
9a9ff9b1ad
Cleanup various compiler warnings that were appearing since the
...
additional compiler flags were added.
2014-08-01 20:02:10 +01:00
Dominic Clifton
e867af8c4b
Correct project name in GPL notices.
2014-06-05 00:47:47 +01:00
Dominic Clifton
63e16494bb
Fix long-standing bug which prevented using UBLOX gps via DMA.
...
This was noticed when updating the UBLOX code in a commit from a couple
of days ago and Dilbert66 from #cleanflight tracked it down.
2014-06-04 23:00:31 +01:00
Dominic Clifton
0bbcd6570f
Updated source files to include the GPL v3 notices. Include a copy of
...
the GPL v3.
2014-06-04 16:48:23 +01:00
Dominic Clifton
d19a5e7046
Cleanup project structure. Update unit test Makefile to place object
...
files in obj/test
2014-05-31 22:43:06 +01:00