2019-06-05 13:29:51 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* arch/arm/src/cxd56xx/cxd56_icc.h
|
|
|
|
*
|
2021-01-24 16:28:57 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2019-06-05 13:29:51 +02:00
|
|
|
*
|
2021-01-24 16:28:57 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2019-06-05 13:29:51 +02:00
|
|
|
*
|
2021-01-24 16:28:57 +01:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2019-06-05 13:29:51 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __ARCH_ARM_SRC_CXD56XX_CXD56_ICC_H
|
|
|
|
#define __ARCH_ARM_SRC_CXD56XX_CXD56_ICC_H
|
|
|
|
|
|
|
|
#define CXD56_PROTO_MSG 0 /* Generic message */
|
|
|
|
#define CXD56_PROTO_MBX 1
|
|
|
|
#define CXD56_PROTO_SEM 2
|
|
|
|
#define CXD56_PROTO_FLG 3
|
|
|
|
#define CXD56_PROTO_MPF 4
|
|
|
|
#define CXD56_PROTO_DBG 5
|
|
|
|
#define CXD56_PROTO_AUDIO 6
|
|
|
|
#define CXD56_PROTO_CALLBACK 7
|
|
|
|
#define CXD56_PROTO_HOTSLEEP 8
|
|
|
|
#define CXD56_PROTO_IMAGE 9
|
|
|
|
#define CXD56_PROTO_PM 10 /* Power manager */
|
2021-05-19 11:00:25 +02:00
|
|
|
#define CXD56_PROTO_HOSTIF 11
|
2019-06-05 13:29:51 +02:00
|
|
|
#define CXD56_PROTO_SYSCTL 12
|
|
|
|
#define CXD56_PROTO_GNSS 13
|
|
|
|
#define CXD56_PROTO_SIG 15 /* Inter-CPU Comm signal */
|
|
|
|
|
|
|
|
typedef int (*cxd56_icchandler_t)(int cpuid, int protoid, uint32_t pdata,
|
2022-04-17 08:01:48 +02:00
|
|
|
uint32_t data, void *userdata);
|
2019-06-05 13:29:51 +02:00
|
|
|
typedef int (*cxd56_iccsighandler_t)(int8_t signo, uint16_t sigdata,
|
2022-04-17 08:01:48 +02:00
|
|
|
uint32_t data, void *userdata);
|
2019-06-05 13:29:51 +02:00
|
|
|
|
|
|
|
struct cxd56_iccmsg_s
|
|
|
|
{
|
|
|
|
int8_t cpuid;
|
|
|
|
int8_t msgid;
|
|
|
|
uint16_t protodata;
|
|
|
|
uint32_t data;
|
|
|
|
};
|
|
|
|
typedef struct cxd56_iccmsg_s iccmsg_t;
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define EXTERN extern "C"
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#else
|
|
|
|
#define EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int cxd56_iccinit(int protoid);
|
|
|
|
int cxd56_iccinitmsg(int cpuid);
|
|
|
|
void cxd56_iccuninit(int protoid);
|
|
|
|
void cxd56_iccuninitmsg(int cpuid);
|
|
|
|
int cxd56_iccregisterhandler(int protoid, cxd56_icchandler_t handler,
|
2022-04-17 08:01:48 +02:00
|
|
|
void *data);
|
2019-06-05 13:29:51 +02:00
|
|
|
int cxd56_iccregistersighandler(int cpuid, cxd56_iccsighandler_t handler,
|
2022-04-17 08:01:48 +02:00
|
|
|
void *data);
|
|
|
|
int cxd56_iccsend(int protoid, iccmsg_t *msg, int32_t ms);
|
|
|
|
int cxd56_iccrecv(int protoid, iccmsg_t *msg, int32_t ms);
|
|
|
|
int cxd56_iccsendmsg(iccmsg_t *msg, int32_t ms);
|
|
|
|
int cxd56_iccrecvmsg(iccmsg_t *msg, int32_t ms);
|
2019-06-05 13:29:51 +02:00
|
|
|
int cxd56_iccsignal(int8_t cpuid, int8_t signo, int16_t sigdata,
|
|
|
|
uint32_t data);
|
2022-04-17 08:01:48 +02:00
|
|
|
int cxd56_iccnotify(int cpuid, int signo, void *sigdata);
|
2019-06-05 13:29:51 +02:00
|
|
|
|
|
|
|
void cxd56_iccinitialize(void);
|
|
|
|
|
|
|
|
#undef EXTERN
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2019-07-04 14:45:17 +02:00
|
|
|
#endif /* __ASSEMBLY__ */
|
2019-06-05 13:29:51 +02:00
|
|
|
#endif /* __ARCH_ARM_SRC_CXD56XX_CXD56_ICC_H */
|