Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RTM] Move 12V turn on/off to AFC specific code #205

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

gustavosr8
Copy link
Contributor

No description provided.

Copy link
Member

@augustofg augustofg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to move the const external_gpio_t ext_gpio table definition from the payload.c file to a new file called pin_mapping.c and include this table in the Doxygen documentation section 'AFCv4.0 Pin Mapping':

#include "pin_mapping.h"

/**
 * @defgroup AFC_V4_0_PIN_MAPPING AFCv4.0 Pin Mapping
 * @ingroup AFC_V4_0
 * @{
 */
const external_gpio_t ext_gpios[16] = {
        [EXT_GPIO_P1V5_VTT_EN] =     { 1, 7 },
        [EXT_GPIO_EN_P1V8] =         { 1, 6 },
        [EXT_GPIO_EN_P1V2] =         { 1, 5 },
        [EXT_GPIO_EN_FMC1_P12V] =    { 1, 4 },
        [EXT_GPIO_EN_FMC2_P12V] =    { 1, 3 },
        [EXT_GPIO_EN_FMC1_PVADJ] =   { 1, 2 },
        [EXT_GPIO_EN_FMC2_PVADJ] =   { 1, 1 },
        [EXT_GPIO_EN_FMC1_P3V3] =    { 1, 0 },
        [EXT_GPIO_EN_FMC2_P3V3] =    { 0, 7 },
        [EXT_GPIO_EN_P1V0] =         { 0, 6 },
        [EXT_GPIO_EN_P3V3] =         { 0, 5 },
        [EXT_GPIO_EN_RTM_PWR] =      { 0, 4 },
        [EXT_GPIO_EN_RTM_MP] =       { 0, 3 },
        [EXT_GPIO_FPGA_I2C_RESET] =  { 0, 2 },
        [EXT_GPIO_DAC_VADJ_RSTn] =   { 0, 1 },
        [EXT_GPIO_PROGRAM_B] =       { 0, 0 }
};
/**
 * @}
 */

port/board/afc-v4/rtm.c Outdated Show resolved Hide resolved
port/board/rtm-8sfp/rtm_user.c Outdated Show resolved Hide resolved
port/board/afc-v4/payload.c Outdated Show resolved Hide resolved
@gustavosr8 gustavosr8 force-pushed the rtm-power-management branch 2 times, most recently from 012cf7e to fd5d434 Compare February 22, 2024 12:26
@augustofg augustofg merged commit dd130a3 into devel Feb 22, 2024
6 checks passed
@augustofg augustofg deleted the rtm-power-management branch February 22, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proper separation of RTM power up and power down responsabilities
2 participants