skeleton for ZX8211

This commit is contained in:
iceman1001 2021-12-24 13:32:28 +01:00
commit 69ea599fee
11 changed files with 253 additions and 1 deletions

View file

@ -81,6 +81,12 @@ else
SRC_LCD =
endif
ifneq (,$(findstring WITH_ZX8211,$(APP_CFLAGS)))
SRC_ZX = lfxz.c
else
SRC_ZX =
endif
# Generic standalone Mode injection of source code
include Standalone/Makefile.inc
@ -122,6 +128,7 @@ THUMBSRC = start.c \
$(SRC_CRC) \
$(SRC_FELICA) \
$(SRC_STANDALONE) \
$(SRC_ZX) \
appmain.c \
printf.c \
dbprint.c \

View file

@ -48,6 +48,7 @@
#include "ticks.h"
#include "commonutil.h"
#include "crc16.h"
#include "zx8211.h"
#ifdef WITH_LCD
@ -541,6 +542,13 @@ static void SendCapabilities(void) {
#else
capabilities.compiled_with_lcd = false;
#endif
#ifdef WITH_ZX8211
capabilities.compiled_with_zx8211 = true;
#else
capabilities.compiled_with_zx8211 = false;
#endif
reply_ng(CMD_CAPABILITIES, PM3_SUCCESS, (uint8_t *)&capabilities, sizeof(capabilities));
}
@ -1196,6 +1204,17 @@ static void PacketReceived(PacketCommandNG *packet) {
}
#endif
#ifdef WITH_ZX8211
case CMD_LF_ZX_READ: {
zx8211_read((zx8211_data_t *)packet->data.asBytes, true);
break;
}
case CMD_LF_ZX_WRITE: {
zx8211_write((zx8211_data_t *)packet->data.asBytes, true);
break;
}
#endif
#ifdef WITH_ISO15693
case CMD_HF_ISO15693_ACQ_RAW_ADC: {
AcquireRawAdcSamplesIso15693();

24
armsrc/lfzx.c Normal file
View file

@ -0,0 +1,24 @@
//-----------------------------------------------------------------------------
// Copyright (C) 2021 Iceman
//
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
// at your option, any later version. See the LICENSE.txt file for the text of
// the license.
//-----------------------------------------------------------------------------
// Low frequency ZX8211 funtions
//-----------------------------------------------------------------------------
#ifndef __LFOPS_H
#define __LFOPS_H
#include "lfzx.h"
#include "pm3_cmd.h" // struct
int zx8211_read(zx8211_data_t *zxd, bool ledcontrol) {
return PM3_SUCCESS;
}
int zx8211_write(zx8211_data_t *zxd, bool ledcontrol) {
return PM3_SUCCESS;
}
#endif

20
armsrc/lfzx.h Normal file
View file

@ -0,0 +1,20 @@
//-----------------------------------------------------------------------------
// Copyright (C) 2021 Iceman
//
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
// at your option, any later version. See the LICENSE.txt file for the text of
// the license.
//-----------------------------------------------------------------------------
// Low frequency ZX8211 funtions
//-----------------------------------------------------------------------------
#ifndef __LFOPS_H
#define __LFOPS_H
#include "common.h"
#include "pm3_cmd.h" // struct
int zx8211_read(zx8211_data_t *zxd, bool ledcontrol);
int zx8211_write(zx8211_data_t *zxd, bool ledcontrol);
#endif