Loading...
Searching...
No Matches
periph_cpu.h File Reference

CPU specific definitions for internal peripheral handling. More...

Detailed Description

CPU specific definitions for internal peripheral handling.

Author
Rakendra Thapa raken.nosp@m.drat.nosp@m.hapa@.nosp@m.gmai.nosp@m.l.com
Marc Poulhiès dkm@k.nosp@m.atap.nosp@m.lop.n.nosp@m.et

Definition in file periph_cpu.h.

#include "cpu.h"
+ Include dependency graph for periph_cpu.h:

Go to the source code of this file.

Data Structures

struct  timer_conf_t
 Timer device configuration. More...
 
struct  spi_conf_t
 SPI device configuration. More...
 

Macros

#define SPI_HWCS(x)   (UINT_MAX - 1)
 Override SPI hardware chip select macro.
 

Enumerations

enum  {
  PORT_A = 0 , PORT_B = 1 , PORT_C = 2 , PORT_D = 3 ,
  PORT_E = 4 , PORT_F = 5
}
 Available ports on the LM4F120. More...
 
#define HAVE_GPIO_T
 Overwrite the default gpio_t type definition.
 
#define GPIO_PIN(x, y)   ((gpio_t)((x<<4) | y))
 
typedef uint32_t gpio_t
 
#define HAVE_GPIO_DIR_T
 Override values for pin direction configuration.
 
enum  gpio_dir_t { GPIO_DIR_IN = GPIO_DIR_MODE_IN , GPIO_DIR_OUT = GPIO_DIR_MODE_OUT }
 
#define PERIPH_SPI_NEEDS_TRANSFER_BYTE   1
 declare needed generic SPI functions
 
#define PERIPH_SPI_NEEDS_TRANSFER_REG   1
 
#define PERIPH_SPI_NEEDS_TRANSFER_REGS   1
 
#define PERIPH_SPI_NEEDS_INIT_CS   1
 

Macro Definition Documentation

◆ GPIO_PIN

#define GPIO_PIN (   x,
 
)    ((gpio_t)((x<<4) | y))

Definition at line 36 of file periph_cpu.h.

◆ HAVE_GPIO_DIR_T

#define HAVE_GPIO_DIR_T

Override values for pin direction configuration.

Definition at line 60 of file periph_cpu.h.

◆ HAVE_GPIO_T

#define HAVE_GPIO_T

Overwrite the default gpio_t type definition.

Definition at line 34 of file periph_cpu.h.

◆ PERIPH_SPI_NEEDS_INIT_CS

#define PERIPH_SPI_NEEDS_INIT_CS   1

Definition at line 153 of file periph_cpu.h.

◆ PERIPH_SPI_NEEDS_TRANSFER_BYTE

#define PERIPH_SPI_NEEDS_TRANSFER_BYTE   1

declare needed generic SPI functions

Definition at line 150 of file periph_cpu.h.

◆ PERIPH_SPI_NEEDS_TRANSFER_REG

#define PERIPH_SPI_NEEDS_TRANSFER_REG   1

Definition at line 151 of file periph_cpu.h.

◆ PERIPH_SPI_NEEDS_TRANSFER_REGS

#define PERIPH_SPI_NEEDS_TRANSFER_REGS   1

Definition at line 152 of file periph_cpu.h.

◆ SPI_HWCS

#define SPI_HWCS (   x)    (UINT_MAX - 1)

Override SPI hardware chip select macro.

As of now, we do not support HW CS, so we always set it to a fixed value

Definition at line 125 of file periph_cpu.h.

Typedef Documentation

◆ gpio_t

typedef uint32_t gpio_t

Definition at line 35 of file periph_cpu.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Available ports on the LM4F120.

Enumerator
PORT_A 

port A

PORT_B 

port B

PORT_C 

port C

PORT_D 

port D

PORT_E 

port E

PORT_F 

port F

Definition at line 84 of file periph_cpu.h.

◆ gpio_dir_t

enum gpio_dir_t
Enumerator
GPIO_DIR_IN 

configure pin as input

GPIO_DIR_OUT 

configure pin as output

Definition at line 61 of file periph_cpu.h.