ESP32 motor to pin mapping

I’ve been studying the ESP32 DIY code. I’m trying to understand where/how it maps the motors to the specific pin numbers. I’d expect that to be in HAL, and I find pin numbers there for almost everything but the ESCs. For an ESP32, I would think that it uses the ledc expressif interfaces, but grepping for these turns up nothing. So I am left trying to understand how ArduCopter initializes the PWM generators and attaches the pin numbers.

Thank you for any help.

I thought I’d try one more time. I do see RCOUT pin mappings. By the name, I wouldn’t think they were the ESC output, but I cannot see anything else.

If you know where to point me to understand how the Ardupilot Copter ESP32_diy drives the inputs to the ESCs, I’d appreciate the pointers. Thank you.

@tenchiro , It is in the RCOutput.cpp:
1.


2.

1 Like

Thank you. This is very helpful. I wasn’t quite sure what the ‘RC’ nomenclature was or if there was some distinction between servo and esc output. But I’m thinking now this is the same. Thank you for your reply.