Merge branch 'master' of https://git.unipi.technology/UniPi/unipi-kernel
authorMiroslav Ondra <ondra@faster.cz>
Wed, 27 Mar 2019 15:49:48 +0000 (16:49 +0100)
committerMiroslav Ondra <ondra@faster.cz>
Wed, 27 Mar 2019 15:49:48 +0000 (16:49 +0100)
1  2 
modules/unipi/src/unipi_spi.h

index 68522037e021b7d21b75d53bbdf0c8d5b37e8612,3f1b4fd216355a63a549bc8f7753c3a81c9ff89e..8dcae85b1e996ea5d039305c8498ad734ef05981
  /********************
   * 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}
  };