diff options
| author | Keith Packard <keithp@keithp.com> | 2012-08-27 13:35:39 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-08-27 13:35:39 -0700 | 
| commit | a27b9b5c36cf748e415ba210c8d8ae72d8227a98 (patch) | |
| tree | 394eb405619e3f19c5a46ee8d523fbac9e6b14bf /src/cc1111/ao_arch_funcs.h | |
| parent | 304909b7534768bfc8da62954effb37ba86806ea (diff) | |
altos: Add SPI slave get/put macros to cc1111
Theese don't try to drive the chip select line
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/cc1111/ao_arch_funcs.h')
| -rw-r--r-- | src/cc1111/ao_arch_funcs.h | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cc1111/ao_arch_funcs.h b/src/cc1111/ao_arch_funcs.h index 29755b5c..5e2fc13d 100644 --- a/src/cc1111/ao_arch_funcs.h +++ b/src/cc1111/ao_arch_funcs.h @@ -29,6 +29,15 @@ extern __xdata uint8_t	ao_spi_mutex;  					  UxGCR_ORDER_MSB |		\  					  ((speed) << UxGCR_BAUD_E_SHIFT))) +#define ao_spi_get_slave(bus) do {			\ +		ao_mutex_get(&ao_spi_mutex);		\ +		ao_spi_set_speed(AO_SPI_SPEED_FAST);	\ +	} while (0) + +#define ao_spi_put_slave(bus) do {		\ +		ao_mutex_put(&ao_spi_mutex);	\ +	} while (0) +  #define ao_spi_get_mask(reg,mask,bus,speed) do {	\  		ao_mutex_get(&ao_spi_mutex);		\  		ao_spi_set_speed(speed);		\  | 
