Subversion Repositories svn.mios32

Rev

Rev 2399 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2399 Rev 2531
Line 1... Line 1...
1
// $Id: seq_led.c 2399 2016-08-10 21:17:32Z tk $
1
// $Id: seq_led.c 2531 2017-10-11 22:55:38Z tk $
2
/*
2
/*
3
 * LED Handlers
3
 * LED Handlers
4
 *
4
 *
5
 * ==========================================================================
5
 * ==========================================================================
6
 *
6
 *
Line 14... Line 14...
14
/////////////////////////////////////////////////////////////////////////////
14
/////////////////////////////////////////////////////////////////////////////
15
// Include files
15
// Include files
16
/////////////////////////////////////////////////////////////////////////////
16
/////////////////////////////////////////////////////////////////////////////
17
17
18
#include <mios32.h>
18
#include <mios32.h>
19
-
 
20
#include <blm_x.h>
-
 
21
19
22
#include "seq_led.h"
20
#include "seq_led.h"
-
 
21
#include "seq_blm8x8.h"
23
#include "seq_hwcfg.h"
22
#include "seq_hwcfg.h"
24
#include "seq_file_hw.h"
23
#include "seq_file_hw.h"
25
24
26
#ifdef MBSEQV4L
25
#ifdef MBSEQV4L
27
#include <blm_cheapo.h>
26
#include <blm_cheapo.h>
Line 70... Line 69...
70
      if( pin >= 216 ) {
69
      if( pin >= 216 ) {
71
    pin = (pin & 0xf8) | (7 - (pin&7));
70
    pin = (pin & 0xf8) | (7 - (pin&7));
72
      }
71
      }
73
    }
72
    }
74
73
75
    return BLM_X_LEDSet(pin-184, 0, value);
74
    return SEQ_BLM8X8_LEDSet(0, pin-184, value);
76
  }
75
  }
77
76
78
  return -1; // pin not available
77
  return -1; // pin not available
79
}
78
}
80
79
Line 109... Line 108...
109
    if( seq_hwcfg_blm8x8.dout_gp_mapping == 2 && sr >= 27 ) {
108
    if( seq_hwcfg_blm8x8.dout_gp_mapping == 2 && sr >= 27 ) {
110
      // MBSEQ V4L SRIO Board
109
      // MBSEQ V4L SRIO Board
111
      value = mios32_dout_reverse_tab[value];
110
      value = mios32_dout_reverse_tab[value];
112
    }
111
    }
113
112
114
    return BLM_X_LEDSRSet(sr-23, 0, value);
113
    return SEQ_BLM8X8_LEDSRSet(0, sr-23, value);
115
  }
114
  }
116
115
117
  return -1; // SR not available
116
  return -1; // SR not available
118
}
117
}
119
118
Line 133... Line 132...
133
  if( sr < 23 )
132
  if( sr < 23 )
134
    return MIOS32_DOUT_SRGet(sr);
133
    return MIOS32_DOUT_SRGet(sr);
135
#endif
134
#endif
136
135
137
  if( sr >= 23 && sr < 31 ) {
136
  if( sr >= 23 && sr < 31 ) {
138
    u8 value = BLM_X_LEDSRGet(sr-23, 0);
137
    u8 value = SEQ_BLM8X8_LEDSRGet(0, sr-23);
139
138
140
    if( seq_hwcfg_blm8x8.dout_gp_mapping == 2 && sr >= 27 ) {
139
    if( seq_hwcfg_blm8x8.dout_gp_mapping == 2 && sr >= 27 ) {
141
      // MBSEQ V4L SRIO Board
140
      // MBSEQ V4L SRIO Board
142
      value = mios32_dout_reverse_tab[value];
141
      value = mios32_dout_reverse_tab[value];
143
    }
142
    }