openMMC
Open Source Modular MMC for AMCs
Loading...
Searching...
No Matches
rtm_user.h
Go to the documentation of this file.
1/*
2 * openMMC -- Open Source modular IPM Controller firmware
3 *
4 * Copyright (C) 2015-2016 Henrique Silva <henrique.silva@lnls.br>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
20 */
21
22#ifndef RTM_USER_H_
23#define RTM_USER_H_
24
25/* PCA9554 outputs */
26#define RTM_GPIO_HOTSWAP_HANDLE 0
27#define RTM_GPIO_OVERTEMP_SHUTDOWN 4
28#define RTM_GPIO_LED_RED 5
29#define RTM_GPIO_LED_GREEN 6
30#define RTM_GPIO_LED_BLUE 7
31
32#define RTM_GPIO_VS1_EN 0
33#define RTM_GPIO_VS2_EN 1
34#define RTM_GPIO_7V_EN 2
35#define RTM_GPIO_5V_EN 3
36#define RTM_GPIO_NEG_7V_EN 4
37
38#include "mmc_error.h"
39
40/* Mandatory RTM module functions */
43uint8_t rtm_get_hotswap_handle_status( uint8_t *state );
44void rtm_hardware_init( void );
45void rtm_ctrl_led( uint8_t id, uint8_t state );
46uint8_t rtm_read_led( uint8_t id );
47bool rtm_compatibility_check( void );
48
49/* User defined functions */
50void rtm_enable_i2c( void );
51void rtm_disable_i2c( void );
52
53#endif
Error handling functions and codes.
mmc_err
Definition mmc_error.h:36
mmc_err rtm_enable_payload_power_post(void)
Definition rtm_user.c:43
mmc_err rtm_disable_payload_power_pre(void)
Definition rtm_user.c:48
void rtm_enable_i2c(void)
uint8_t rtm_read_led(uint8_t id)
Definition rtm_user.c:156
bool rtm_compatibility_check(void)
Definition rtm_user.c:77
void rtm_ctrl_led(uint8_t id, uint8_t state)
Definition rtm_user.c:132
uint8_t rtm_get_hotswap_handle_status(uint8_t *state)
Definition rtm_user.c:53
void rtm_disable_i2c(void)
void rtm_hardware_init(void)
Definition rtm_user.c:72