bkp.h — Maple v0.0.10beta Documentation

### Navigation

- next
- previous |
- LeafLabs |
- Index »
- `libmaple` »
- APIs »

# `bkp.h`

[Stub] support.

## Library Documentation

> Backup register support.

> Defines

> > BKP_NR_DATA_REGS

> > BKP_BASE

> >   Backup peripheral register map base pointer.

> > BKP_DR_D

> > BKP_RTCCR_ASOS_BIT

> > BKP_RTCCR_ASOE_BIT

> > BKP_RTCCR_CCO_BIT

> > BKP_RTCCR_ASOS

> > BKP_RTCCR_ASOE

> > BKP_RTCCR_CCO

> > BKP_RTCCR_CAL

> > BKP_CR_TPAL_BIT

> > BKP_CR_TPE_BIT

> > BKP_CR_TPAL

> > BKP_CR_TPE

> > BKP_CSR_TIF_BIT

> > BKP_CSR_TEF_BIT

> > BKP_CSR_TPIE_BIT

> > BKP_CSR_CTI_BIT

> > BKP_CSR_CTE_BIT

> > BKP_CSR_TIF

> > BKP_CSR_TEF

> > BKP_CSR_TPIE

> > BKP_CSR_CTI

> > BKP_CSR_CTE

> Functions

> > void bkp_init(void )

> >   Initialize backup interface.

> >   Enables the power and backup interface clocks, and resets the backup device.

> > void bkp_enable_writes(void )

> >   Enable write access to the backup registers.

> >   Backup interface must be initialized for subsequent register writes to work.

> >   See: | bkp_init()

> > void bkp_disable_writes(void )

> >   Disable write access to the backup registers.

> > uint16 bkp_read(uint8 reg)

> >   Read a value from given backup data register.

> >   Parameters: | `reg` - Data register to read, from 1 to BKP_NR_DATA_REGS (10 on medium-density devices, 42 on high-density devices).

> > void bkp_write(uint8 reg, uint16 val)

> >   Write a value to given data register.

> >   Write access to backup registers must be enabled.

> >   Parameters: | `reg` - Data register to write, from 1 to BKP_NR_DATA_REGS (10 on medium-density devices, 42 on high-density devices). `val` - Value to write into the register.
> >   See: | bkp_enable_writes()

> Variables

> > const bkp_dev * BKP

> >   Backup device.

> class bkp_reg_map

> > Backup peripheral register map type.

> > Public Members

> > > const uint32 RESERVED1

> > >   Reserved.

> > > __io uint32 DR1

> > >   Data register 1.

> > > __io uint32 DR2

> > >   Data register 2.

> > > __io uint32 DR3

> > >   Data register 3.

> > > __io uint32 DR4

> > >   Data register 4.

> > > __io uint32 DR5

> > >   Data register 5.

> > > __io uint32 DR6

> > >   Data register 6.

> > > __io uint32 DR7

> > >   Data register 7.

> > > __io uint32 DR8

> > >   Data register 8.

> > > __io uint32 DR9

> > >   Data register 9.

> > > __io uint32 DR10

> > >   Data register 10.

> > > __io uint32 RTCCR

> > >   RTC control register.

> > > __io uint32 CR

> > >   Control register.

> > > __io uint32 CSR

> > >   Control and status register.

> class bkp_dev

> > Backup peripheral device type.

> > Public Members

> > > bkp_reg_map * regs

> > >   Register map.

### Navigation

- next
- previous |
- LeafLabs |
- Index »
- `libmaple` »
- APIs »