Как то так
/////////////////////////////////////
// Generated Initialization File //
/////////////////////////////////////
#include "compiler_defs.h"
#include "C8051F960_defs.h"
// Peripheral specific initialization functions,
// Called from the Init_Device() function
void Port_IO_Init()
{
// P0.0 - Unassigned, Open-Drain, Digital
// P0.1 - Unassigned, Open-Drain, Digital
// P0.2 - Unassigned, Open-Drain, Digital
// P0.3 - Unassigned, Open-Drain, Digital
// P0.4 - Unassigned, Open-Drain, Digital
// P0.5 - Unassigned, Open-Drain, Digital
// P0.6 - Unassigned, Open-Drain, Digital
// P0.7 - Unassigned, Open-Drain, Digital
// P1.0 - SCK (SPI1), Open-Drain, Digital
// P1.1 - MISO (SPI1), Open-Drain, Digital
// P1.2 - MOSI (SPI1), Open-Drain, Digital
// P1.3 - NSS (SPI1), Open-Drain, Digital
// P1.4 - Unassigned, Open-Drain, Digital
// P1.5 - Unassigned, Open-Drain, Digital
// P1.6 - Unassigned, Open-Drain, Digital
// P1.7 - Unassigned, Open-Drain, Digital
// P2.0 - Unassigned, Push-Pull, Digital
// P2.1 - Unassigned, Open-Drain, Digital
// P2.2 - Unassigned, Push-Pull, Digital
// P2.3 - Unassigned, Push-Pull, Digital
// P2.4 - Unassigned, Open-Drain, Digital
// P2.5 - Unassigned, Open-Drain, Digital
// P2.6 - Unassigned, Open-Drain, Digital
// P2.7 - Unassigned, Open-Drain, Digital
SFRPAGE = LEGACY_PAGE ;
P2MDOUT = 0x0D;
XBR1 = 0x40;
XBR2 = 0x40;
}
// Initialization function for device,
// Call Init_Device() from your main program
void Init_Device(void)
{
Port_IO_Init();
}