summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cluster_api.h39
-rw-r--r--include/cluster_api_registernotify.h27
-rw-r--r--include/cluster_api_shiftposition.h54
-rw-r--r--include/cluster_api_speed.h30
-rw-r--r--include/cluster_api_tacho.h23
-rw-r--r--include/cluster_api_telltale.h111
-rw-r--r--include/cluster_api_tripcomputer.h67
7 files changed, 351 insertions, 0 deletions
diff --git a/include/cluster_api.h b/include/cluster_api.h
new file mode 100644
index 0000000..39e0367
--- /dev/null
+++ b/include/cluster_api.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2021, Nippon Seiki Co., Ltd.
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+#ifndef CLUSTER_API_H
+#define CLUSTER_API_H
+
+typedef enum {
+ IC_HMI_OFF = 0,
+ IC_HMI_ON,
+} IC_HMI_ON_OFF;
+
+#include <cluster_api_telltale.h>
+#include <cluster_api_shiftposition.h>
+#include <cluster_api_speed.h>
+#include <cluster_api_tacho.h>
+#include <cluster_api_tripcomputer.h>
+#include <cluster_api_registernotify.h>
+
+bool clusterInit(void);
+bool clusterTerm(void);
+
+// Callback function pointer type
+typedef void (*IC_HMI_FUNC_NOTIFY_IC_HMI)(unsigned long long arg_1, IC_HMI_ON_OFF arg_2);
+
+#endif // CLUSTER_API_H
diff --git a/include/cluster_api_registernotify.h b/include/cluster_api_registernotify.h
new file mode 100644
index 0000000..6340977
--- /dev/null
+++ b/include/cluster_api_registernotify.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2021, Nippon Seiki Co., Ltd.
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+#ifndef CLUSTER_API_REGISTERNOTIFY_H
+#define CLUSTER_API_REGISTERNOTIFY_H
+
+#include <stdbool.h>
+
+typedef void(* IC_HMI_FUNC_NOTIFY_IC_HMI)(unsigned long long arg_1, IC_HMI_ON_OFF arg_2);
+
+bool registerIcHmi(unsigned long long arg_1, IC_HMI_FUNC_NOTIFY_IC_HMI addr);
+
+#endif // CLUSTER_API_REGISTERNOTIFY_H
diff --git a/include/cluster_api_shiftposition.h b/include/cluster_api_shiftposition.h
new file mode 100644
index 0000000..6cf7b08
--- /dev/null
+++ b/include/cluster_api_shiftposition.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2021, Nippon Seiki Co., Ltd.
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+#ifndef CLUSTER_API_SHIFTPOSITION_H
+#define CLUSTER_API_SHIFTPOSITION_H
+
+typedef enum
+{
+ IC_HMI_AT_OFF = 0,
+ IC_HMI_AT_PARKING,
+ IC_HMI_AT_REVERSE,
+ IC_HMI_AT_NEUTRAL,
+ IC_HMI_AT_DRIVE,
+ IC_HMI_AT_SECOND,
+ IC_HMI_AT_LOW_GEAR,
+ IC_HMI_AT_FIRST,
+ IC_HMI_AT_MANUAL,
+ IC_HMI_AT_BRAKE,
+ IC_HMI_AT_ALL_ON,
+ IC_HMI_AT_ALL_OFF,
+ IC_HMI_AT_UNUSED,
+} IC_HMI_GEAR_AT_VAL;
+
+typedef enum
+{
+ IC_HMI_MT_OFF = 0,
+ IC_HMI_MT_FIRST,
+ IC_HMI_MT_SECOND,
+ IC_HMI_MT_THIRD,
+ IC_HMI_MT_FOURTH,
+ IC_HMI_MT_FIFTH,
+ IC_HMI_MT_SIXTH,
+ IC_HMI_MT_SEVENTH,
+ IC_HMI_MT_EIGHTTH,
+} IC_HMI_GEAR_MT_VAL;
+
+IC_HMI_GEAR_AT_VAL getGearAtVal(void);
+IC_HMI_GEAR_MT_VAL getGearMtVal(void);
+
+#endif // CLUSTER_API_SHIFTPOSITION_H
diff --git a/include/cluster_api_speed.h b/include/cluster_api_speed.h
new file mode 100644
index 0000000..bb4d1ec
--- /dev/null
+++ b/include/cluster_api_speed.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2021, Nippon Seiki Co., Ltd.
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+#ifndef CLUSTER_API_SPEED_H
+#define CLUSTER_API_SPEED_H
+
+typedef enum
+{
+ IC_HMI_SP_KM_H = 0,
+ IC_HMI_SP_MPH = 1,
+} IC_HMI_SP_UNIT_VAL;
+
+unsigned long getSpAnalogVal(void);
+IC_HMI_SP_UNIT_VAL getSpAnaDigUnitVal(void);
+
+#endif // CLUSTER_API_SPEED_H
diff --git a/include/cluster_api_tacho.h b/include/cluster_api_tacho.h
new file mode 100644
index 0000000..f8a2a2c
--- /dev/null
+++ b/include/cluster_api_tacho.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2021, Nippon Seiki Co., Ltd.
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+#ifndef CLUSTER_API_TACHO_H
+#define CLUSTER_API_TACHO_H
+
+unsigned long getTaAnalogVal(void);
+
+#endif // CLUSTER_API_TACHO_H \ No newline at end of file
diff --git a/include/cluster_api_telltale.h b/include/cluster_api_telltale.h
new file mode 100644
index 0000000..ac318ac
--- /dev/null
+++ b/include/cluster_api_telltale.h
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2021, Nippon Seiki Co., Ltd.
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+#ifndef CLUSTER_API_TELLTALE_H
+#define CLUSTER_API_TELLTALE_H
+
+// Signal flags
+#define IC_HMI_TT_TURN_R 0x0000000000000001ULL
+#define IC_HMI_TT_TURN_L 0x0000000000000002ULL
+#define IC_HMI_TT_BRAKE 0x0000000000000004ULL
+#define IC_HMI_TT_SEATBELT 0x0000000000000008ULL
+#define IC_HMI_TT_HIGHBEAM 0x0000000000000010ULL
+#define IC_HMI_TT_DOOR 0x0000000000000020ULL
+#define IC_HMI_TT_EPS 0x0000000000000040ULL
+#define IC_HMI_TT_SRS_AIRBAG 0x0000000000000080ULL
+#define IC_HMI_TT_ABS 0x0000000000000100ULL
+#define IC_HMI_TT_LOW_BATTERY 0x0000000000000200ULL
+#define IC_HMI_TT_OIL_PRESS 0x0000000000000400ULL
+#define IC_HMI_TT_ENGINE 0x0000000000000800ULL
+#define IC_HMI_TT_FUEL 0x0000000000001000ULL
+#define IC_HMI_TT_IMMOBI 0x0000000000002000ULL
+#define IC_HMI_TT_TM_FAIL 0x0000000000004000ULL
+#define IC_HMI_TT_ESP_ACT 0x0000000000008000ULL
+#define IC_HMI_TT_ESP_OFF 0x0000000000010000ULL
+#define IC_HMI_TT_ADAPTING_LIGHTING 0x0000000000020000ULL
+#define IC_HMI_TT_AUTO_STOP 0x0000000000040000ULL
+#define IC_HMI_TT_AUTO_STOP_FAIL 0x0000000000080000ULL
+#define IC_HMI_TT_PARKING_LIGHTS 0x0000000000100000ULL
+#define IC_HMI_TT_FRONT_FOG 0x0000000000200000ULL
+#define IC_HMI_TT_EXTERIOR_LIGHT_FAULT 0x0000000000400000ULL
+#define IC_HMI_TT_ACC_FAIL 0x0000000000800000ULL
+#define IC_HMI_TT_LDW_OFF 0x0000000001000000ULL
+#define IC_HMI_TT_HILL_DESCENT 0x0000000002000000ULL
+#define IC_HMI_TT_AUTO_HI_BEAM_GREEN 0x0000000004000000ULL
+#define IC_HMI_TT_AUTO_HI_BEAM_AMBER 0x0000000008000000ULL
+#define IC_HMI_TT_LDW_OPERATE 0x0000000010000000ULL
+#define IC_HMI_TT_GENERAL_WARN 0x0000000020000000ULL
+#define IC_HMI_TT_SPORTS_MODE 0x0000000040000000ULL
+#define IC_HMI_TT_DRIVING_POWER_MODE 0x0000000080000000ULL
+#define IC_HMI_TT_HOT_TEMP 0x0000000100000000ULL
+#define IC_HMI_TT_LOW_TEMP 0x0000000200000000ULL
+#define IC_HMI_TT_ALL 0xFFFFFFFFFFFFFFFFULL
+
+IC_HMI_ON_OFF getTurnR(void);
+IC_HMI_ON_OFF getTurnL(void);
+IC_HMI_ON_OFF getBrake(void);
+IC_HMI_ON_OFF getSeatbelt(void);
+IC_HMI_ON_OFF getFrontRightSeatbelt(void);
+IC_HMI_ON_OFF getFrontCenterSeatbelt(void);
+IC_HMI_ON_OFF getFrontLeftSeatbelt(void);
+IC_HMI_ON_OFF getMid1RightSeatbelt(void);
+IC_HMI_ON_OFF getMid1CenterSeatbelt(void);
+IC_HMI_ON_OFF getMid1LeftSeatbelt(void);
+IC_HMI_ON_OFF getMid2RightSeatbelt(void);
+IC_HMI_ON_OFF getMid2CenterSeatbelt(void);
+IC_HMI_ON_OFF getMid2LeftSeatbelt(void);
+IC_HMI_ON_OFF getRearRightSeatbelt(void);
+IC_HMI_ON_OFF getRearCenterSeatbelt(void);
+IC_HMI_ON_OFF getRearLeftSeatbelt(void);
+IC_HMI_ON_OFF getHighbeam(void);
+IC_HMI_ON_OFF getDoor(void);
+IC_HMI_ON_OFF getFrontRightDoor(void);
+IC_HMI_ON_OFF getFrontLeftDoor(void);
+IC_HMI_ON_OFF getRearRightDoor(void);
+IC_HMI_ON_OFF getRearLeftDoor(void);
+IC_HMI_ON_OFF getTrunkDoor(void);
+IC_HMI_ON_OFF getHoodDoor(void);
+IC_HMI_ON_OFF getEps(void);
+IC_HMI_ON_OFF getSrsAirbag(void);
+IC_HMI_ON_OFF getAbs(void);
+IC_HMI_ON_OFF getLowBattery(void);
+IC_HMI_ON_OFF getOilPress(void);
+IC_HMI_ON_OFF getEngine(void);
+IC_HMI_ON_OFF getFuel(void);
+IC_HMI_ON_OFF getImmobi(void);
+IC_HMI_ON_OFF getTMFail(void);
+IC_HMI_ON_OFF getEspAct(void);
+IC_HMI_ON_OFF getEspOff(void);
+IC_HMI_ON_OFF getAdaptingLighting(void);
+IC_HMI_ON_OFF getAutoStop(void);
+IC_HMI_ON_OFF getAutoStopFail(void);
+IC_HMI_ON_OFF getParkingLights(void);
+IC_HMI_ON_OFF getFrontFog(void);
+IC_HMI_ON_OFF getExteriorLightFault(void);
+IC_HMI_ON_OFF getAccFail(void);
+IC_HMI_ON_OFF getLdwOff(void);
+IC_HMI_ON_OFF getHillDescent(void);
+IC_HMI_ON_OFF getAutoHiBeamGreen(void);
+IC_HMI_ON_OFF getAutoHiBeamAmber(void);
+IC_HMI_ON_OFF getSportsMode(void);
+IC_HMI_ON_OFF getLdwOperate(void);
+IC_HMI_ON_OFF getGeneralWarn(void);
+IC_HMI_ON_OFF getDriverPowerMode(void);
+IC_HMI_ON_OFF getHotTemp(void);
+IC_HMI_ON_OFF getLowTemp(void);
+
+#endif // CLUSTER_API_TELLTALE_H
diff --git a/include/cluster_api_tripcomputer.h b/include/cluster_api_tripcomputer.h
new file mode 100644
index 0000000..d723646
--- /dev/null
+++ b/include/cluster_api_tripcomputer.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2021, Nippon Seiki Co., Ltd.
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+#ifndef CLUSTER_API_TRIPCOMPUTER_H
+#define CLUSTER_API_TRIPCOMPUTER_H
+
+typedef enum
+{
+ IC_HMI_TRCOM_KM = 0,
+ IC_HMI_TRCOM_MILE = 1,
+} IC_HMI_TRCOM_UNIT_VAL;
+
+typedef enum
+{
+ IC_HMI_FUEL_KM_L = 0,
+ IC_HMI_FUEL_MPG_US,
+ IC_HMI_FUEL_MPG_IG,
+ IC_HMI_FUEL_L_100KM,
+ IC_HMI_FUEL_MILE_KWH,
+ IC_HMI_FUEL_KM_KWH,
+ IC_HMI_FUEL_MILE_KG,
+ IC_HMI_FUEL_KM_KG,
+ IC_HMI_FUEL_KWH_100KM,
+} IC_HMI_FUEL_ECONOMY_UNIT_VAL;
+
+typedef enum
+{
+ IC_HMI_OTEMP_UNIT_C = 0,
+ IC_HMI_OTEMP_UNIT_K = 1,
+} IC_HMI_OTEMP_UNIT_VAL;
+
+unsigned long getTrcomTripAVal(void);
+unsigned long getTrcomTripBVal(void);
+unsigned long getTrcomOdoVal(void);
+IC_HMI_TRCOM_UNIT_VAL getTrcomUnitVal(void);
+unsigned short getAvgSpeedAVal(void);
+unsigned short getAvgSpeedBVal(void);
+unsigned short getHourAVal(void);
+unsigned short getHourBVal(void);
+unsigned char getMinuteAVal(void);
+unsigned char getMinuteBVal(void);
+unsigned char getSecondAVal(void);
+unsigned char getSecondBVal(void);
+signed short getOTempVal(void);
+IC_HMI_OTEMP_UNIT_VAL getOTempUnitVal(void);
+unsigned short getCruRangeVal(void);
+unsigned short getAvgFuelAVal(void);
+unsigned short getAvgFuelBVal(void);
+unsigned short getInsFuelAVal(void);
+unsigned short getInsFuelBVal(void);
+IC_HMI_FUEL_ECONOMY_UNIT_VAL getFuelEconomyUnitVal(void);
+
+#endif // CLUSTER_API_TRIPCOMPUTER_H