# modules/dmx/dmx.h File Reference

## Defines
#define | DMX_UNIVERSE_SIZE 512
#define | DMX_BAUDRATE 250000
#define | BREAK_BAUDRATE 40000
#define | DMX_IDLE 0
#define | DMX_BREAK 1
#define | DMX_SENDING 2
#define | DMX_TX_PORT GPIOA
#define | DMX_TX_PIN GPIO_Pin_9
#define | DMX_RX_PORT GPIOA
#define | DMX_RX_PIN GPIO_Pin_10
#define | DMX USART1
#define | DMX_IRQ_CHANNEL USART1_IRQn
#define | DMX_IRQHANDLER_FUNC void USART1_IRQHandler(void)
## Functions
s32 | DMX_Init (u32 mode)
s32 | DMX_SetChannel (u16 channel, u8 value)
s32 | DMX_GetChannel (u16 channel)

## Define Documentation

#define BREAK_BAUDRATE 40000

#define DMX USART1

#define DMX_BAUDRATE 250000

#define DMX_BREAK 1

#define DMX_IDLE 0

#define DMX_IRQ_CHANNEL USART1_IRQn

#define DMX_IRQHANDLER_FUNC void USART1_IRQHandler(void)

#define DMX_RX_PIN GPIO_Pin_10

#define DMX_RX_PORT GPIOA

#define DMX_SENDING 2

#define DMX_TX_PIN GPIO_Pin_9

#define DMX_TX_PORT GPIOA

#define DMX_UNIVERSE_SIZE 512

## Function Documentation

s32 DMX_GetChannel | ( | u16 | channel | ) |

s32 DMX_Init | ( | u32 | mode | ) |

Initialize DMX Interface

Parameters:

  `[in]` | mode | currently only mode 0 supported

Returns:
  < 0 if initialisation failed

s32 DMX_SetChannel | ( | u16 | channel,
|  | u8 | value |
| ) |  |  |