哪位高手用过lonworks SPI的从模式.为什么我的输出管脚只有高电平?
#pragma num_alias_table_entries 1
#pragma app_buf_out_size 66
#pragma app_buf_out_count 3
#pragma app_buf_out_priority_count 0
#pragma net_buf_out_priority_count 0
#pragma net_buf_out_size 66
#pragma net_buf_out_count 3
#pragma app_buf_in_size 66
#pragma app_buf_in_count 3
#pragma net_buf_in_size 66
#pragma net_buf_in_count 3
//#pragma enable_multiple_baud
//#pragma receive_trans 8
//#pragma scheduler_reset
#include <addrdefs.h>
#include <access.h>
#include <msg_addr.h>
#include <status.h>
#include <control.h>
#include <stdlib.h>
//IO_8 neurowire master select(IO_1) C8051F_IO;
//IO_8 neurowire slave timeout(IO_1) C8051F_IO;
IO_8 neurowire slave C8051F_IO;
//unsigned int
IO_0 input bit CS1=1;
IO_2 output bit LED=1;
IO_1 output bit CS=1;
//mtimer tmrf= 5000;
unsigned int output_value[3];
//unsigned int input_values;
//unsigned int receive;
//when(timer_expires(tmrf))
when(io_changes(CS1)to 0)
{
output_value[0]=0x01;
output_value[1]=0x02;
output_value[2]=0x03;
io_in(C8051F_IO, &input_values,24 );
//io_out(CS,1);
//input_values=io_in(C8051F_IO,&input_values,8);
// tmrf = 1000;
// }
//}
}