Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more body to H and C files from dwarf info #21

Merged
merged 1 commit into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions components/bl602/bl602_wifi/ip/cfg/cfg_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,51 @@ char * cfg_api_element_dump(void * val, CFG_ELEMENT_TYPE type, char * strs);
int cfg_api_element_general_get(cfg_element_entry * entry, void * arg1, void * arg2);
int cfg_api_element_general_set(cfg_element_entry * entry, void * arg1, void * arg2);
int cfg_api_element_set(uint32_t task, uint32_t element, uint32_t type, void * arg1, void * arg2);
#if 0 //TODO EXISTS ALEADY
/**
* @file cfg_api.c
* Source file for BL602
*/
#include "cfg_api.h"


const char *cfg_api_element_dump(void *val, enum CFG_ELEMENT_TYPE type, char *strs);
int cfg_api_element_general_set(struct cfg_element_entry *entry, void *arg1, void *arg2);
int cfg_api_element_general_get(struct cfg_element_entry *entry, void *arg1, void *arg2);
int cfg_api_element_set(uint32_t task, uint32_t element, uint32_t type, void *arg1, void *arg2);




/** *cfg_api_element_dump
*/
const char *cfg_api_element_dump(void *val, enum CFG_ELEMENT_TYPE type, char *strs)
{
ASSER_ERR(FALSE);
returnNULL;
}

/** cfg_api_element_general_set
*/
int cfg_api_element_general_set(struct cfg_element_entry *entry, void *arg1, void *arg2)
{
ASSER_ERR(FALSE);
return -1;
}

/** cfg_api_element_general_get
*/
int cfg_api_element_general_get(struct cfg_element_entry *entry, void *arg1, void *arg2)
{
ASSER_ERR(FALSE);
return -1;
}

/** cfg_api_element_set
*/
int cfg_api_element_set(uint32_t task, uint32_t element, uint32_t type, void *arg1, void *arg2)
{
ASSER_ERR(FALSE);
return -1;
}
#endf 0 //TODO EXISTS ALEADY
21 changes: 21 additions & 0 deletions components/bl602/bl602_wifi/ip/cfg/cfg_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,24 @@ struct cfg_element_entry {
int (* notify)(struct cfg_element_entry *, void *, void *, enum CFG_ELEMENT_TYPE_OPS);
};

#if 0 //TODO EXISTS ALEADY
/**
* @file cfg_api.h
* Header file for BL602
*/
#ifndef __CFG_API_H__
#define __CFG_API_H__

struct cfg_element_entry {
uint32_t task; // +0
uint16_t element; // +4
uint16_t type; // +6
char *name; // +8
void *val; // +12
int (*set)(struct cfg_element_entry *, void *, void *); // +16
int (*get)(struct cfg_element_entry *, void *, void *); // +20
int (*notify)(struct cfg_element_entry *, void *, void *, enum CFG_ELEMENT_TYPE_OPS); // +24
};

#endif // __CFG_API_H__
#endf 0 //TODO EXISTS ALEADY
34 changes: 34 additions & 0 deletions components/bl602/bl602_wifi/ip/cfg/cfg_task.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@

int cfg_start_req_handler(ke_msg_id_t msgid, cfg_start_req * param, ke_task_id_t dest_id, ke_task_id_t src_id);
void dump_cfg_entries(void);
#if 0 //TODO EXISTS ALEADY
/**
* @file cfg_task.c
* Source file for BL602
*/
#include "cfg_task.h"


void dump_cfg_entries(void);
static int cfg_start_req_handler(const ke_msg_id_t msgid, struct cfg_start_req *param, const ke_task_id_t dest_id, const ke_task_id_t src_id);

const struct ke_msg_handler cfg_default_state[1];
const struct ke_state_handler cfg_default_handler;
ke_state_t cfg_state[1];




/** dump_cfg_entries
*/
void dump_cfg_entries(void)
{
ASSER_ERR(FALSE);
return;
}

/** cfg_start_req_handler
*/
static int cfg_start_req_handler(const ke_msg_id_t msgid, struct cfg_start_req *param, const ke_task_id_t dest_id, const ke_task_id_t src_id)
{
ASSER_ERR(FALSE);
return -1;
}
#endf 0 //TODO EXISTS ALEADY
49 changes: 49 additions & 0 deletions components/bl602/bl602_wifi/ip/cfg/cfg_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,52 @@ typedef enum cfg_state_tag {
CFG_STATE_MAX=1
} cfg_state_tag;

#if 0 //TODO EXISTS ALEADY
/**
* @file cfg_task.h
* Header file for BL602
*/
#ifndef __CFG_TASK_H__
#define __CFG_TASK_H__

enum cfg_state_tag {
CFG_IDLE = 0,
CFG_STATE_MAX = 1,
};
enum cfg_msg_tag {
CFG_START_REQ = 12288,
CFG_START_CFM = 12289,
};
struct {
uint32_t task; // +0
uint32_t element; // +4
uint32_t length; // +8
uint32_t buf[0]; // +12
} cfg_start_req_u_tlv_t;
struct cfg_start_req {
uint32_t ops; // +0
union {
struct {
uint32_t task; // +0
uint32_t element; // +4
} get[];
struct {
uint32_t task; // +0
uint32_t element; // +4
} reset[];
struct {
uint32_t task; // +0
uint32_t element; // +4
uint32_t type; // +8
uint32_t length; // +12
uint32_t buf[0]; // +16
} set[];
} u; // +4
};
struct cfg_start_cfm {
uint8_t status; // +0
};
const struct ke_state_handler cfg_default_handler;ke_state_t cfg_state[1];

#endif // __CFG_TASK_H__
#endf 0 //TODO EXISTS ALEADY
124 changes: 124 additions & 0 deletions components/bl602/bl602_wifi/ip/lmac/src/bl/bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,127 @@ void bl_reset_evt(int dummy);
int bl_sleep(void);
void bl_wakeup(void);
void supplicantFuncInit(void);
#if 0 //TODO EXISTS ALEADY
/**
* @file bl.c
* Source file for BL602
*/
#include "bl.h"


struct bl_env_tag bl_env;
static struct notifier_block *fw_nap_chain_ptr;
struct notifier_block fw_nap_chain;

void bl_init(void);
void bl_reset_evt(int dummy);
int bl_sleep(void);
void bl_wakeup(void);
uint32_t bl_nap_calculate(void);
int bl_nap_call(uint32_t time);
int bl_nap_hook_register(struct notifier_block *nb);
int bl_nap_hook_register_fromCritical(struct notifier_block *nb);
int bl_nap_hook_unregister(struct notifier_block *nb);
int bl_nap_hook_unregister_fromCritical(struct notifier_block *nb);
int bl_nap_hook_call(int event, void *env);
int bl_nap_hook_call_fromCritical(int event, void *env);




/** bl_init
*/
void bl_init(void)
{
ASSER_ERR(FALSE);
return;
}

/** bl_reset_evt
*/
void bl_reset_evt(int dummy)
{
ASSER_ERR(FALSE);
return;
}

/** bl_sleep
*/
int bl_sleep(void)
{
ASSER_ERR(FALSE);
return -1;
}

/** bl_wakeup
*/
void bl_wakeup(void)
{
ASSER_ERR(FALSE);
return;
}

/** bl_nap_calculate
*/
uint32_t bl_nap_calculate(void)
{
ASSER_ERR(FALSE);
return 0xffffffff;
}

/** bl_nap_call
*/
int bl_nap_call(uint32_t time)
{
ASSER_ERR(FALSE);
return -1;
}

/** bl_nap_hook_register
*/
int bl_nap_hook_register(struct notifier_block *nb)
{
ASSER_ERR(FALSE);
return -1;
}

/** bl_nap_hook_register_fromCritical
*/
int bl_nap_hook_register_fromCritical(struct notifier_block *nb)
{
ASSER_ERR(FALSE);
return -1;
}

/** bl_nap_hook_unregister
*/
int bl_nap_hook_unregister(struct notifier_block *nb)
{
ASSER_ERR(FALSE);
return -1;
}

/** bl_nap_hook_unregister_fromCritical
*/
int bl_nap_hook_unregister_fromCritical(struct notifier_block *nb)
{
ASSER_ERR(FALSE);
return -1;
}

/** bl_nap_hook_call
*/
int bl_nap_hook_call(int event, void *env)
{
ASSER_ERR(FALSE);
return -1;
}

/** bl_nap_hook_call_fromCritical
*/
int bl_nap_hook_call_fromCritical(int event, void *env)
{
ASSER_ERR(FALSE);
return -1;
}
#endf 0 //TODO EXISTS ALEADY
16 changes: 16 additions & 0 deletions components/bl602/bl602_wifi/ip/lmac/src/bl/bl.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,19 @@ struct bl_env_tag {
void bl_init(void);
void bl_nap_calculate(void);
void bl_sleep(void);
#if 0 //TODO EXISTS ALEADY
/**
* @file bl.h
* Header file for BL602
*/
#ifndef __BL_H__
#define __BL_H__

struct bl_env_tag {
uint8_t prev_hw_state; // +0
int hw_in_doze; // +4
};
struct bl_env_tag bl_env;

#endif // __BL_H__
#endf 0 //TODO EXISTS ALEADY
Loading