LCM — CH32V003 Light Control Module
Light Control Module, I2C slave
Loading...
Searching...
No Matches
lcm_relay.c File Reference
#include "lcm_relay.h"
#include "lcm_module.h"
#include "ch32v00x_conf.h"

Go to the source code of this file.

Data Structures

struct  LCM_RelayGpio
 

Functions

uint8_t LCM_Relay_Init (void)
 
uint8_t LCM_Relay_Apply (uint8_t relay_state)
 

Variables

static const LCM_RelayGpio s_relay_gpio [LCM_RELAY_COUNT]
 

Function Documentation

◆ LCM_Relay_Apply()

uint8_t LCM_Relay_Apply ( uint8_t relay_state)

◆ LCM_Relay_Init()

uint8_t LCM_Relay_Init ( void )

Definition at line 75 of file lcm_relay.c.

References LCM_ERR_GPIO_GET, LCM_ERR_GPIO_INIT, LCM_ERR_NONE, LCM_RELAY_COUNT, and s_relay_gpio.

Referenced by LCM_Module_Init().

Variable Documentation

◆ s_relay_gpio

const LCM_RelayGpio s_relay_gpio[LCM_RELAY_COUNT]
static
Initial value:
= {
{ GPIOC, GPIO_Pin_3 },
{ GPIOC, GPIO_Pin_4 },
{ GPIOC, GPIO_Pin_5 },
{ GPIOC, GPIO_Pin_6 },
{ GPIOC, GPIO_Pin_7 },
{ GPIOD, GPIO_Pin_0 },
{ GPIOD, GPIO_Pin_2 },
{ GPIOD, GPIO_Pin_3 }
}

Definition at line 36 of file lcm_relay.c.

Referenced by LCM_Relay_Apply(), and LCM_Relay_Init().