Skip to content

Conversation

@peterbarker
Copy link
Contributor

(and adjust backends to take HAL::Device rather than HAL::I2CDevice)

This is primarily to reduce the number of calls to i2c_mgr->get_device and hal.spi->get_device so moving away from OwnPtr is easier.

However, we also:

  • remove memory leaks when driver disabled (the check for enablement is done inside add_backend, and we don't free the allocated backend if the thing is disabled
  • save flash
  • allow for more refactoring of the probing to avoid the FOR_EACH code generation
Board                    AP_Periph  blimp  bootloader  copter  heli   iofirmware  plane  rover  sub
CubeOrange-periph-heavy  -2160             *                                                    
Durandal                            -2136  *           -2136   -2136              -2136  -2136  -2136
Hitec-Airspeed           *                 *                                                    
KakuteH7-bdshot                     -2064  *           -2064   -2072              -2064  -2064  -2064
MatekF405                           -1816  *           -1824   -1816              -1816  -1816  -1816
Pixhawk1-1M-bdshot                  -1896              -1888   -1888              -1896  -1896  -1896
SITL_x86_64_linux_gnu               *                  *       *                  *      *      *
f103-QiotekPeriph        0                 *                                                    
f303-MatekGPS            0                 *                                                    
f303-Universal           -1448             *                                                    
iomcu                                                                 *                         
revo-mini                           0      *           0       0                  0      0      0
skyviper-v2450                                         0                                        
speedybeef4                         -1816  *           -1816   -1824              -1816  -1816  -1816

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

1 participant