mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Scripting: add bindings get/set full mode for GPIO
allows setting alternate pin modes pin drive strengths etc.
This commit is contained in:
parent
810e51be0d
commit
7513281f65
@ -1711,6 +1711,26 @@ function gpio:write(pin_number, value) end
|
||||
---@return boolean -- pin state
|
||||
function gpio:read(pin_number) end
|
||||
|
||||
-- desc
|
||||
---@param pin_number integer
|
||||
---@param mode uint32_t_ud|integer|number
|
||||
function gpio:set_mode(pin_number, mode) end
|
||||
|
||||
-- desc
|
||||
---@param pin_number integer
|
||||
---@return uint32_t_ud|nil -- full pin mode ioline_t in chibios
|
||||
function gpio:get_mode(pin_number) end
|
||||
|
||||
-- desc
|
||||
---@param pin_number integer
|
||||
---@param mode uint32_t_ud|integer|number
|
||||
function gpio:setPinFullMode(pin_number, mode) end
|
||||
|
||||
-- desc
|
||||
---@param pin_number integer
|
||||
---@return uint32_t_ud|nil -- full pin mode ioline_t in chibios
|
||||
function gpio:getPinFullMode(pin_number) end
|
||||
|
||||
|
||||
-- desc
|
||||
Motors_6DoF = {}
|
||||
|
@ -631,6 +631,10 @@ singleton hal.gpio method read boolean uint8_t'skip_check
|
||||
singleton hal.gpio method write void uint8_t'skip_check uint8_t 0 1
|
||||
singleton hal.gpio method toggle void uint8_t'skip_check
|
||||
singleton hal.gpio method pinMode void uint8_t'skip_check uint8_t 0 1
|
||||
singleton hal.gpio method get_mode boolean uint8_t'skip_check uint32_t'Null
|
||||
singleton hal.gpio method get_mode alias getPinFullMode
|
||||
singleton hal.gpio method set_mode void uint8_t'skip_check uint32_t'skip_check
|
||||
singleton hal.gpio method set_mode alias setPinFullMode
|
||||
|
||||
singleton hal.analogin depends !defined(HAL_DISABLE_ADC_DRIVER)
|
||||
singleton hal.analogin rename analog
|
||||
|
Loading…
Reference in New Issue
Block a user