HPM SDK
HPMicro Software Development Kit
GWC driver APIs

GWC APIs. More...

Data Structures

struct  gwc_ch_config
 gwc channel config More...
 
struct  gwc_config
 gwc config More...
 

Typedefs

typedef struct gwc_ch_config gwc_ch_config_t
 gwc channel config More...
 
typedef enum gwc_clk_pol gwc_clk_pol_t
 gwc clk polarity More...
 
typedef struct gwc_config gwc_config_t
 gwc config More...
 

Enumerations

enum  gwc_clk_pol { gwc_clk_pol_normal = 0 , gwc_clk_pol_invert }
 gwc clk polarity More...
 

Functions

void gwc_get_default_config (gwc_config_t *cfg)
 init the gwc More...
 
void gwc_init (GWC_Type *ptr, gwc_config_t *cfg)
 init the gwc More...
 
void gwc_enable (GWC_Type *ptr)
 enable the gwc More...
 
void gwc_disable (GWC_Type *ptr)
 disable the gwc More...
 
static void gwc_enable_interrupt (GWC_Type *ptr, uint32_t mask)
 enable interrupts More...
 
static void gwc_disable_interrupt (GWC_Type *ptr, uint32_t mask)
 disable interrupts. More...
 
static uint32_t gwc_get_status (GWC_Type *ptr)
 get gwc status flag More...
 
static void gwc_clear_status (GWC_Type *ptr, uint32_t mask)
 clear gwc status flag More...
 
void gwc_freeze_interrupt_control (GWC_Type *ptr)
 disable change of interrupt masks More...
 
void gwc_ch_init (GWC_Type *ptr, uint8_t ch_index, gwc_ch_config_t *cfg)
 init gwc channel More...
 
static void gwc_ch_enable (GWC_Type *ptr, uint8_t ch_index)
 enable gwc channel More...
 
static void gwc_ch_disable (GWC_Type *ptr, uint8_t ch_index)
 disable gwc channel More...
 
static uint32_t gwc_ch_get_crc (GWC_Type *ptr, uint8_t ch_index)
 get gwc channel calc crc More...
 

Detailed Description

GWC APIs.

Typedef Documentation

◆ gwc_ch_config_t

#include <drivers/inc/hpm_gwc_drv.h>

gwc channel config

Note
area of channel do not overlap. in other words, eache pixel belongs to a single channel at most.

◆ gwc_clk_pol_t

typedef enum gwc_clk_pol gwc_clk_pol_t

#include <drivers/inc/hpm_gwc_drv.h>

gwc clk polarity

◆ gwc_config_t

typedef struct gwc_config gwc_config_t

#include <drivers/inc/hpm_gwc_drv.h>

gwc config

Enumeration Type Documentation

◆ gwc_clk_pol

#include <drivers/inc/hpm_gwc_drv.h>

gwc clk polarity

Enumerator
gwc_clk_pol_normal 
gwc_clk_pol_invert 

Function Documentation

◆ gwc_ch_disable()

static void gwc_ch_disable ( GWC_Type ptr,
uint8_t  ch_index 
)
inlinestatic

#include <drivers/inc/hpm_gwc_drv.h>

disable gwc channel

Parameters
[in]ptrGWC base address
[in]ch_indexchannel index ref GWC_CHANNEL_CHn

◆ gwc_ch_enable()

static void gwc_ch_enable ( GWC_Type ptr,
uint8_t  ch_index 
)
inlinestatic

#include <drivers/inc/hpm_gwc_drv.h>

enable gwc channel

Parameters
[in]ptrGWC base address
[in]ch_indexchannel index ref GWC_CHANNEL_CHn

◆ gwc_ch_get_crc()

static uint32_t gwc_ch_get_crc ( GWC_Type ptr,
uint8_t  ch_index 
)
inlinestatic

#include <drivers/inc/hpm_gwc_drv.h>

get gwc channel calc crc

Parameters
[in]ptrGWC base address
[in]ch_indexchannel index ref GWC_CHANNEL_CHn

◆ gwc_ch_init()

void gwc_ch_init ( GWC_Type ptr,
uint8_t  ch_index,
gwc_ch_config_t cfg 
)

#include <drivers/inc/hpm_gwc_drv.h>

init gwc channel

Parameters
[in]ptrGWC base address
[in]ch_indexchannel index ref GWC_CHANNEL_CHn
[in]cfgconfig of gwc channel
Note
the function is called while gwc channel is disable only

◆ gwc_clear_status()

static void gwc_clear_status ( GWC_Type ptr,
uint32_t  mask 
)
inlinestatic

#include <drivers/inc/hpm_gwc_drv.h>

clear gwc status flag

Parameters
[in]ptrGWC base address
[in]masklogical OR'ed of GWC_IRQ_STS_XXX_STS_MASK

◆ gwc_disable()

void gwc_disable ( GWC_Type ptr)

#include <drivers/inc/hpm_gwc_drv.h>

disable the gwc

Parameters
[in]ptrGWC base address

◆ gwc_disable_interrupt()

static void gwc_disable_interrupt ( GWC_Type ptr,
uint32_t  mask 
)
inlinestatic

#include <drivers/inc/hpm_gwc_drv.h>

disable interrupts.

Parameters
[in]ptrGWC base address
[in]maskmask of interrupt events that would be enabled. GWC_IRQ_MASK_ERR_MASK_MASK GWC_IRQ_MASK_FUNC_MASK_MASK

◆ gwc_enable()

void gwc_enable ( GWC_Type ptr)

#include <drivers/inc/hpm_gwc_drv.h>

enable the gwc

Parameters
[in]ptrGWC base address

◆ gwc_enable_interrupt()

static void gwc_enable_interrupt ( GWC_Type ptr,
uint32_t  mask 
)
inlinestatic

#include <drivers/inc/hpm_gwc_drv.h>

enable interrupts

Parameters
[in]ptrGWC base address
[in]maskMask of interrupt events that would be enabled GWC_IRQ_MASK_ERR_MASK_MASK GWC_IRQ_MASK_FUNC_MASK_MASK

◆ gwc_freeze_interrupt_control()

void gwc_freeze_interrupt_control ( GWC_Type ptr)

#include <drivers/inc/hpm_gwc_drv.h>

disable change of interrupt masks

Once this function is called, the interrupt enabled status could not be changed until reset.

Parameters
[in]ptrGWC base address

◆ gwc_get_default_config()

void gwc_get_default_config ( gwc_config_t cfg)

#include <drivers/inc/hpm_gwc_drv.h>

init the gwc

Parameters
[in]cfgGWC config gwc_config_t

◆ gwc_get_status()

static uint32_t gwc_get_status ( GWC_Type ptr)
inlinestatic

#include <drivers/inc/hpm_gwc_drv.h>

get gwc status flag

Parameters
[in]ptrGWC base address
Returns
gwc status

◆ gwc_init()

void gwc_init ( GWC_Type ptr,
gwc_config_t cfg 
)

#include <drivers/inc/hpm_gwc_drv.h>

init the gwc

Parameters
[in]ptrGWC base address
[in]cfgGWC config gwc_config_t
Note
the function is called while gwc is disable only