From: Miroslav Ondra Date: Wed, 27 Mar 2019 15:49:48 +0000 (+0100) Subject: Merge branch 'master' of https://git.unipi.technology/UniPi/unipi-kernel X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=a5fd2c73f99c39f14e7b8222a46b7659e9478a74;p=graphit%2Funipi-kernel.git Merge branch 'master' of https://git.unipi.technology/UniPi/unipi-kernel --- a5fd2c73f99c39f14e7b8222a46b7659e9478a74 diff --cc modules/unipi/src/unipi_spi.h index 6852203,3f1b4fd..8dcae85 --- a/modules/unipi/src/unipi_spi.h +++ b/modules/unipi/src/unipi_spi.h @@@ -27,24 -27,25 +27,24 @@@ /******************** * Module Constants * ********************/ - +/* #define NEURONSPI_SLOWER_MODELS_LEN 3 static const u16 NEURONSPI_SLOWER_MODELS[NEURONSPI_SLOWER_MODELS_LEN] = { - 0xb10, 0xc10, 0xf10 + 0xb10, 0xc10, 0xf10, 0xb20 }; +*/ - -#define UNIPISPI_PROBE_MESSAGE_LEN 16 -static u8 _probe_message_second[UNIPISPI_PROBE_MESSAGE_LEN] = - {0x04, 0x00, 0xe8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x16}; -static const struct neuronspi_op_buffer UNIPISPI_PROBE_MESSAGE = { - first_message: {0x04, 0x0e, 0xe8, 0x03, 0xa0, 0xdd}, - second_message: _probe_message_second, +struct neuronspi_frequecy_map +{ + u16 model; + u16 mask; + int frequency; }; - -static const struct neuronspi_op_buffer UNIPISPI_IDLE_MESSAGE = { - first_message: {0xfa, 0x00, 0x55, 0x0e, 0xb6, 0x0a}, - second_message: NULL, +#define NEURONSPI_FREQUENCY_LEN 2 +static const struct neuronspi_frequecy_map NEURONSPI_FREQUENCY_MAP[NEURONSPI_FREQUENCY_LEN] = { + {model:0x0b00, mask:0xff00, frequency:NEURONSPI_SLOWER_FREQ }, + {model:0x0000, mask:0x0000, frequency:NEURONSPI_COMMON_FREQ} };