I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
DS_GPMS.h File Reference

DS-GPM.S Driver. More...

#include "sarmfsw.h"
#include "I2C_component.h"
#include "I2C_peripheral.h"
#include "DS_GPMS_ex.h"
#include "DS_GPMS_proc.h"
Include dependency graph for DS_GPMS.h:
This graph shows which files directly or indirectly include this file:

Data Structures

union  uGPMS_REG__STATUS
 Union for STATUS register of DS-GPM.S. More...
 

Macros

#define GPMS_ADDR   0x68U
 DS-GPM.S address.
 
#define GPMS_JUMPER_A0_A1   0U
 DS-GPM.S index with jumper A0 & A1.
 
#define GPMS_JUMPER_A1   1U
 DS-GPM.S index with jumper A1.
 
#define GPMS_JUMPER_A0   2U
 DS-GPM.S index with jumper A0.
 
#define GPMS_JUMPER_NONE   3U
 DS-GPM.S index with no jumper.
 
#define GPMS_BASE_ADDR   (GPMS_ADDR + GPMS_JUMPER_A0_A1)
 DS-GPM.S Base address.
 

Enumerations

enum  GPMS_wr_reg { GPMS__IO_DIRECTION = 0U , GPMS__IO_INPUT_TYPE , GPMS__IO_PORT_OUTPUT }
 Write register map enum of DS-GPM.S. More...
 
enum  GPMS_rd_reg {
  GPMS__HOURS_TENS = 0U , GPMS__HOURS_UNITS , GPMS__MINUTES_TENS , GPMS__MINUTES_UNITS ,
  GPMS__SECONDS_TENS , GPMS__SECONDS_UNITS , GPMS__DAY_OF_MONTH_TENS , GPMS__DAY_OF_MONTH_UNITS ,
  GPMS__MONTH_TENS , GPMS__MONTH_UNITS , GPMS__YEARS_THOUSANDS , GPMS__YEARS_HUNDREDS ,
  GPMS__YEARS_TENS , GPMS__YEARS_UNITS , GPMS__LATITUDE_DEGREES_TENS , GPMS__LATITUDE_DEGREES_UNITS ,
  GPMS__LATITUDE_MINUTES_TENS , GPMS__LATITUDE_MINUTES_UNITS , GPMS__LATITUDE_MINUTES_TENTHS , GPMS__LATITUDE_MINUTES_HUNDREDTHS ,
  GPMS__LATITUDE_MINUTES_THOUSANDS , GPMS__LATITUDE_MINUTES_TEN_THOUSANDS , GPMS__LATITUDE_DIRECTION_CHARACTER , GPMS__LONGITUDE_DEGREES_HUNDREDTHS ,
  GPMS__LONGITUDE_DEGREES_TENS , GPMS__LONGITUDE_DEGREES_UNITS , GPMS__LONGITUDE_MINUTES_TENS , GPMS__LONGITUDE_MINUTES_UNITS ,
  GPMS__LONGITUDE_MINUTES_TENTHS , GPMS__LONGITUDE_MINUTES_HUNDREDTHS , GPMS__LONGITUDE_MINUTES_THOUSANDS , GPMS__LONGITUDE_MINUTES_TEN_THOUSANDS ,
  GPMS__LONGITUDE_DIRECTION_CHARACTER , GPMS__GPS_QUALITY_INDICATOR , GPMS__SATELLITES_IN_USE_TENS , GPMS__SATELLITES_IN_USE_UNITS ,
  GPMS__HDOP_TENS , GPMS__HDOP_UNITS , GPMS__HDOP_TENTHS , GPMS__ALTITUDE_TENS_OF_THOUSANDS ,
  GPMS__ALTITUDE_THOUSANDS , GPMS__ALTITUDE_HUNDREDS , GPMS__ALTITUDE_TENS , GPMS__ALTITUDE_UNITS ,
  GPMS__HEADING_DEGREES_TRUE_HUNDREDS , GPMS__HEADING_DEGREES_TRUE_TENS , GPMS__HEADING_DEGREES_TRUE_UNITS , GPMS__HEADING_DEGREES_TRUE_TENTHS ,
  GPMS__HEADING_DEGREES_MAGNETIC_HUNDREDS , GPMS__HEADING_DEGREES_MAGNETIC_TENS , GPMS__HEADING_DEGREES_MAGNETIC_UNITS , GPMS__HEADING_DEGREES_MAGNETIC_TENTHS ,
  GPMS__SPEED_HUNDREDS , GPMS__SPEED_TENS , GPMS__SPEED_UNITS , GPMS__SPEED_TENTHS ,
  GPMS__GPS_MODE , GPMS__AN0_VALUE , GPMS__AN1_VALUE , GPMS__AN2_VALUE ,
  GPMS__AN3_VALUE , GPMS__IOS_VALUE , GPMS__STATUS
}
 Read register map enum of DS-GPM.S. More...
 
enum  GPMS_direction { GPMS__DIR_EAST = 'E' , GPMS__DIR_NORTH = 'N' , GPMS__DIR_SOUTH = 'S' , GPMS__DIR_WEST = 'W' }
 DS-GPM.S direction enum. More...
 
enum  GPMS_quality { GPMS__NO_GPS = 0U , GPMS__GPS , GPMS__DGPS }
 DS-GPM.S signal quality. More...
 
enum  GPMS_mode {
  GPMS__MODE_AUTONOMOUS = 'A' , GPMS__MODE_DIFFERENTIAL = 'D' , GPMS__MODE_ESTIMATED = 'E' , GPMS__MODE_MANUAL = 'M' ,
  GPMS__MODE_SIMULATED = 'S' , GPMS__MODE_DATA_NOT_VALID = 'N'
}
 DS-GPM.S modes enum. More...
 
enum  GPMS_north { GPMS__TRUE_NORTH = 0U , GPMS__MAGNETIC_NORTH }
 DS-GPM.S north type. More...
 

Functions

FctERR GPMS_Init (void)
 Initialization for GPMS peripheral.
 
FctERR GPMS_Write (const uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Write function for GPMS.
 
FctERR GPMS_Read (uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Read function for GPMS.
 

Detailed Description

DS-GPM.S Driver.

Author
SMFSW

DS-GPM.S: 99 Channel Positioning System (GPS + GLONASS) Shield

Macro Definition Documentation

◆ GPMS_ADDR

#define GPMS_ADDR   0x68U

DS-GPM.S address.

◆ GPMS_BASE_ADDR

#define GPMS_BASE_ADDR   (GPMS_ADDR + GPMS_JUMPER_A0_A1)

DS-GPM.S Base address.

Note
Define GPMS_BASE_ADDR to change default device base address

◆ GPMS_JUMPER_A0

#define GPMS_JUMPER_A0   2U

DS-GPM.S index with jumper A0.

◆ GPMS_JUMPER_A0_A1

#define GPMS_JUMPER_A0_A1   0U

DS-GPM.S index with jumper A0 & A1.

◆ GPMS_JUMPER_A1

#define GPMS_JUMPER_A1   1U

DS-GPM.S index with jumper A1.

◆ GPMS_JUMPER_NONE

#define GPMS_JUMPER_NONE   3U

DS-GPM.S index with no jumper.

Enumeration Type Documentation

◆ GPMS_direction

DS-GPM.S direction enum.

Enumerator
GPMS__DIR_EAST 

Direction East.

GPMS__DIR_NORTH 

Direction North.

GPMS__DIR_SOUTH 

Direction South.

GPMS__DIR_WEST 

Direction West.

◆ GPMS_mode

enum GPMS_mode

DS-GPM.S modes enum.

Enumerator
GPMS__MODE_AUTONOMOUS 

Autonomous mode.

GPMS__MODE_DIFFERENTIAL 

Differential mode.

GPMS__MODE_ESTIMATED 

Estimated mode.

GPMS__MODE_MANUAL 

Manual input mode.

GPMS__MODE_SIMULATED 

Simulated mode.

GPMS__MODE_DATA_NOT_VALID 

Data not valid.

◆ GPMS_north

enum GPMS_north

DS-GPM.S north type.

Enumerator
GPMS__TRUE_NORTH 

True north.

GPMS__MAGNETIC_NORTH 

Magnetic north.

◆ GPMS_quality

DS-GPM.S signal quality.

Enumerator
GPMS__NO_GPS 

No GPS.

GPMS__GPS 

GPS.

GPMS__DGPS 

DGPS.

◆ GPMS_rd_reg

Read register map enum of DS-GPM.S.

Enumerator
GPMS__HOURS_TENS 

Hours tens register.

GPMS__HOURS_UNITS 

Hours units register.

GPMS__MINUTES_TENS 

Minutes tens register.

GPMS__MINUTES_UNITS 

Minutes units register.

GPMS__SECONDS_TENS 

Seconds tens register.

GPMS__SECONDS_UNITS 

Seconds units register.

GPMS__DAY_OF_MONTH_TENS 

Day of month tens register.

GPMS__DAY_OF_MONTH_UNITS 

Day of month units register.

GPMS__MONTH_TENS 

Month tens register.

GPMS__MONTH_UNITS 

Month units register.

GPMS__YEARS_THOUSANDS 

Years thousands register.

GPMS__YEARS_HUNDREDS 

Years hundreds register.

GPMS__YEARS_TENS 

Years tens register.

GPMS__YEARS_UNITS 

Years units register.

GPMS__LATITUDE_DEGREES_TENS 

Latitude degree tens register.

GPMS__LATITUDE_DEGREES_UNITS 

Latitude degree units register.

GPMS__LATITUDE_MINUTES_TENS 

Latitude minutes tens register.

GPMS__LATITUDE_MINUTES_UNITS 

Latitude minutes units register.

GPMS__LATITUDE_MINUTES_TENTHS 

Latitude minutes tenths register.

GPMS__LATITUDE_MINUTES_HUNDREDTHS 

Latitude minutes hundredths register.

GPMS__LATITUDE_MINUTES_THOUSANDS 

Latitude minutes thousands register.

GPMS__LATITUDE_MINUTES_TEN_THOUSANDS 

Latitude minutes ten thousands register.

GPMS__LATITUDE_DIRECTION_CHARACTER 

Latitude direction character register.

GPMS__LONGITUDE_DEGREES_HUNDREDTHS 

Longitude degrees hundredths register.

GPMS__LONGITUDE_DEGREES_TENS 

Longitude degrees tens register.

GPMS__LONGITUDE_DEGREES_UNITS 

Longitude degrees units register.

GPMS__LONGITUDE_MINUTES_TENS 

Longitude minutes tens register.

GPMS__LONGITUDE_MINUTES_UNITS 

Longitude minutes units register.

GPMS__LONGITUDE_MINUTES_TENTHS 

Longitude minutes tenths register.

GPMS__LONGITUDE_MINUTES_HUNDREDTHS 

Longitude minutes hundredths register.

GPMS__LONGITUDE_MINUTES_THOUSANDS 

Longitude minutes thousands register.

GPMS__LONGITUDE_MINUTES_TEN_THOUSANDS 

Longitude minutes ten thousands register.

GPMS__LONGITUDE_DIRECTION_CHARACTER 

Longitude direction character register.

GPMS__GPS_QUALITY_INDICATOR 

GPS quality indicator.

GPMS__SATELLITES_IN_USE_TENS 

Satellites in use tens register.

GPMS__SATELLITES_IN_USE_UNITS 

Satellites in use units register.

GPMS__HDOP_TENS 

HDOP tens register.

GPMS__HDOP_UNITS 

HDOP units register.

GPMS__HDOP_TENTHS 

HDOP tenths register.

GPMS__ALTITUDE_TENS_OF_THOUSANDS 

Altitude (m) tens of thousands register.

GPMS__ALTITUDE_THOUSANDS 

Altitude (m) thousands register.

GPMS__ALTITUDE_HUNDREDS 

Altitude (m) hundreds register.

GPMS__ALTITUDE_TENS 

Altitude (m) tens register.

GPMS__ALTITUDE_UNITS 

Altitude (m) units register.

GPMS__HEADING_DEGREES_TRUE_HUNDREDS 

Heading degrees (true North) hundreds register.

GPMS__HEADING_DEGREES_TRUE_TENS 

Heading degrees (true North) tens register.

GPMS__HEADING_DEGREES_TRUE_UNITS 

Heading degrees (true North) units register.

GPMS__HEADING_DEGREES_TRUE_TENTHS 

Heading degrees (true North) tenths register.

GPMS__HEADING_DEGREES_MAGNETIC_HUNDREDS 

Heading degrees (magnetic North) hundreds register.

GPMS__HEADING_DEGREES_MAGNETIC_TENS 

Heading degrees (magnetic North) tens register.

GPMS__HEADING_DEGREES_MAGNETIC_UNITS 

Heading degrees (magnetic North) units register.

GPMS__HEADING_DEGREES_MAGNETIC_TENTHS 

Heading degrees (magnetic North) tenths register.

GPMS__SPEED_HUNDREDS 

Speed hundreds register.

GPMS__SPEED_TENS 

Speed tens register.

GPMS__SPEED_UNITS 

Speed units register.

GPMS__SPEED_TENTHS 

Speed tenths register.

GPMS__GPS_MODE 

GPS mode character register.

GPMS__AN0_VALUE 

Local analogic input AN0 value register.

GPMS__AN1_VALUE 

Local analogic input AN1 value register.

GPMS__AN2_VALUE 

Local analogic input AN2 value register.

GPMS__AN3_VALUE 

Local analogic input AN3 value register.

GPMS__IOS_VALUE 

Local I/O port input value.

GPMS__STATUS 

DS-GPM.S Status register.

◆ GPMS_wr_reg

Write register map enum of DS-GPM.S.

Enumerator
GPMS__IO_DIRECTION 

Local IO port direction register.

GPMS__IO_INPUT_TYPE 

Local IO port input type register.

GPMS__IO_PORT_OUTPUT 

Local IO port output data register.

Function Documentation

◆ GPMS_Init()

FctERR GPMS_Init ( void )

Initialization for GPMS peripheral.

Weak Functions
GPMS Base address may be changed if user implemented
Returns
FctERR - error code
Here is the call graph for this function:

◆ GPMS_Read()

FctERR GPMS_Read ( uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Read function for GPMS.

Parameters
[in,out]data- pointer to read to
[in]addr- Address to read from
[in]nb- Number of bytes to read
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GPMS_Write()

FctERR GPMS_Write ( const uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Write function for GPMS.

Parameters
[in]data- pointer to write from
[in]addr- Address to write to
[in]nb- Number of bytes to write
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: