Project 8  Bluetooth
Neff Site
Macros | Functions
rn41.h File Reference

This module implements an interface for Bluetooth click module. More...

Go to the source code of this file.

Macros

#define RN41_PORT   PORTC
 
#define RN41_USART_MODULE   USARTC1
 
#define RN41_RESET_bp   PIN0_bp
 
#define RN41_UART_RX_bp   PIN7_bp
 
#define RN41_UART_TX_bp   PIN6_bp
 
#define RN41_UART_RTS_bp   PIN5_bp
 
#define RN41_UART_CTS_bp   PIN4_bp
 
#define RN41_RESET_bm   PIN0_bm
 
#define RN41_UART_RX_bm   PIN7_bm
 
#define RN41_UART_TX_bm   PIN6_bm
 
#define RN41_UART_RTS_bm   PIN5_bm
 
#define RN41_UART_CTS_bm   PIN4_bm
 
#define RN41_DRE_vect   USARTC1_DRE_vect
 
#define RN41_RXC_vect   USARTC1_RXC_vect
 

Functions

void rn41_init (void)
 Initialize the Bluetooth module. More...
 
void rn41_on (void)
 Enable the module. More...
 
void rn41_off (void)
 Disable the module. More...
 
uint8_t rn41_receive (void)
 Receive data. More...
 
void rn41_transmit (uint8_t data)
 Transmit data. More...
 

Detailed Description

This module implements an interface for Bluetooth click module.

In order to establish a connection to the Bluetooth module an outgoing console session via port Bluetooth-Master 'RNI-SPP' is used. Please check Bluetooth & other devices / More Bluetooth options / COM Ports. The status of Bluetooth-Master will be connected if a connection has successfully been established.

Author
Wolfgang Neff
Version
1.0
Date
2018-07-09
History
Created: 2018-07-09

Macro Definition Documentation

◆ RN41_DRE_vect

#define RN41_DRE_vect   USARTC1_DRE_vect

◆ RN41_PORT

#define RN41_PORT   PORTC

◆ RN41_RESET_bm

#define RN41_RESET_bm   PIN0_bm

◆ RN41_RESET_bp

#define RN41_RESET_bp   PIN0_bp

◆ RN41_RXC_vect

#define RN41_RXC_vect   USARTC1_RXC_vect

◆ RN41_UART_CTS_bm

#define RN41_UART_CTS_bm   PIN4_bm

◆ RN41_UART_CTS_bp

#define RN41_UART_CTS_bp   PIN4_bp

◆ RN41_UART_RTS_bm

#define RN41_UART_RTS_bm   PIN5_bm

◆ RN41_UART_RTS_bp

#define RN41_UART_RTS_bp   PIN5_bp

◆ RN41_UART_RX_bm

#define RN41_UART_RX_bm   PIN7_bm

◆ RN41_UART_RX_bp

#define RN41_UART_RX_bp   PIN7_bp

◆ RN41_UART_TX_bm

#define RN41_UART_TX_bm   PIN6_bm

◆ RN41_UART_TX_bp

#define RN41_UART_TX_bp   PIN6_bp

◆ RN41_USART_MODULE

#define RN41_USART_MODULE   USARTC1

Function Documentation

◆ rn41_init()

void rn41_init ( void  )

Initialize the Bluetooth module.

Sets up the USART interface of the module.

◆ rn41_off()

void rn41_off ( void  )

Disable the module.

Disables the module by turning the reset signal on.

◆ rn41_on()

void rn41_on ( void  )

Enable the module.

Enables the module by turning the reset signal off.

◆ rn41_receive()

uint8_t rn41_receive ( void  )

Receive data.

Receives one data byte via the Bluetooth interface.

Returns
The data byte received.

◆ rn41_transmit()

void rn41_transmit ( uint8_t  data)

Transmit data.

Transmit one data byte via the Bluetooth interface.

Parameters
dataThe data byte to be transmitted.
Contact