1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00
Commit graph

9 commits

Author SHA1 Message Date
Dominic Clifton
9fa99cf9f5 Re-organize files by topic
Keil project not updated, I have no way to verify it.

Note, mw.c, drv_pwm.c and drv_system.c contain code for too many topics.
Later commits will relocate the code as appropriate.

Not even looked at utils yet.  'Utils' is a bad naming practice and is a
synonym for 'too lazy to find the right file/name'.
2014-04-08 16:11:17 +01:00
Dominic Clifton
aef3c6ad97 Update timer handling to support multiple events at the same time.
This can occur when servicing two software serial ports via a multiple
timer channels on the same channel.
2014-04-07 20:13:09 +01:00
Dominic Clifton
c7de7d2ebc Add support for 2 softserial ports on PWM4+5/TIM3_CH1+2/PA6+PA7 and
PWM6+7/TIM3_CH3+4/PB0+PB1

Update software serial to monitor serial pins for signal changes instead
of periodically sampling pin signals.

When reading the data the timer used is syncronized to the falling edge
of the start bit which allows for better syncronisation at higher
speeds.  The code has been tested OK from 1200 baud to 19200.  38400
baud was tested and partially usable but has been disabled because there
are too many transmit and receive errors, especially when transmitting
and receiving at the same time.

Due to the way a single timer is used for transmitting and receiving, if
data comes in while transmitting the system may incorrectly transmit a
short or long bit.  However at 19200 and below this didn't cause a
problem in the limited testing I performed.
2014-04-03 22:42:15 +01:00
Dominic Clifton
c36d884899 Change softserial timer calculation code to support baud rates in the
range 600 to 19200 (tested)
2014-04-03 13:00:12 +01:00
dongie
e8b3d00003 implement (not flight tested) brushed motors support.
set motor_pwm_rate to some value > 500 (1000, 8000, 16000 etc works on my scope).
then the motor output can be used to directly drive brushed motor fets.
PWM is rescaled to 0-base in brushed mode, so all same values of min/maxthrottle apply.
2014-01-31 11:56:55 +09:00
dominicc1974@gmail.com
4c191270bf Changing all line endings to WINDOWS line endings (CR+LF) and removing all End-Of-Line whitespace and using spaces instead of tabs. Please ensure you configure your editors and tools to follow suit. If using git please enable autocrlf in your .git/config file.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@393 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-09-06 23:14:48 +00:00
timecop@gmail.com
77a241bd5f Software serial implementation. Compile with SOFTSERIAL_19200_LOOPBACK to test. Without the define the implementation will have no effect. Next step is to add a 'feature' to enable softserial and settings for the baud rate. Note, only READ is currently supported, write will come later. The highlevel api calls are used in main.c. Uart implementation needs cleanup to make serial port code generic, see uart files for details.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@390 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-08-28 01:26:10 +00:00
timecop@gmail.com
f9b48925fa marking some static timer lists const.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@388 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-08-25 15:12:12 +00:00
timecop@gmail.com
003c2a91c5 Separate timer code from PWM/PPM code. The method of looking up a callback is now generic which means other (forthcoming) code can configure callback handlers.
Killed some leftovers of GPIO_Pin* stuff I forgot about.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@387 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-08-25 12:45:36 +00:00