ARMmbed / mbed-hal-st-stm32f4

mbed HAL for ST STM32F4-series microcontrollers
Other
7 stars 21 forks source link

pinmap_function not declared #7

Closed 0xc0170 closed 9 years ago

0xc0170 commented 9 years ago

There're 3 hal modules (pwmout, analogin, analogout) in this repository which invoke pinmap_function (warning - implicit declaration). This function is currently not declared in mbed-hal, neither defined in the mbed-drivers.

Code with a warning, taken from pwmout code file:

void pwmout_init(pwmout_t* obj, PinName pin)
{
    // Get the peripheral name from the pin and assign it to the object
    obj->pwm = (PWMName)pinmap_peripheral(pin, PinMap_PWM);

    // Get the functions (timer channel, (non)inverted) from the pin and assign it to the object
    uint32_t function = pinmap_function(pin, PinMap_PWM);

For reference, this is the PR to mbed, which adds pinmap_function plus F4 reorganization: https://github.com/mbedmicro/mbed/commit/a70bdc5c0086a4fb1176038ab6b342f38541edb9